Class FieldList (2.35.0)

public final class FieldList extends AbstractList<Field> implements Serializable

Google BigQuery Table schema fields (columns). Each field has a unique name and index. Fields with duplicate names are not allowed in BigQuery schema.

Inheritance

java.lang.Object > java.util.AbstractCollection > AbstractList > FieldList

Implements

Serializable

Static Methods

of(Field[] fields)

public static FieldList of(Field[] fields)

Returns a new FieldList object, which contains a collection of Field objects in preserved order and represent schema columns.

Parameter
NameDescription
fieldsField[]

the schema fields

Returns
TypeDescription
FieldList

of(Iterable<Field> fields)

public static FieldList of(Iterable<Field> fields)

Returns a new FieldList object, which contains a collection of Field objects in preserved order and represent schema columns.

Parameter
NameDescription
fieldsIterable<Field>

the schema fields

Returns
TypeDescription
FieldList

Methods

get(int index)

public Field get(int index)

Get schema field by index.

Parameter
NameDescription
indexint

field (column) index

Returns
TypeDescription
Field
Overrides

get(String name)

public Field get(String name)

Get schema field by name.

Parameter
NameDescription
nameString

field (column) name

Returns
TypeDescription
Field

getIndex(String name)

public int getIndex(String name)

Get schema field's index by name.

Parameter
NameDescription
nameString

field (column) name

Returns
TypeDescription
int

size()

public int size()

Total number of fields (columns) in the schema.

Returns
TypeDescription
int
Overrides