Package com.google.cloud.bigquery
Class FieldList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<Field>
-
- com.google.cloud.bigquery.FieldList
-
- All Implemented Interfaces:
Serializable
,Iterable<Field>
,Collection<Field>
,List<Field>
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.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Field
get(int index)
Get schema field by index.Field
get(String name)
Get schema field by name.int
getIndex(String name)
Get schema field's index by name.static FieldList
of(Field... fields)
Returns a newFieldList
object, which contains a collection ofField
objects in preserved order and represent schema columns.static FieldList
of(Iterable<Field> fields)
Returns a newFieldList
object, which contains a collection ofField
objects in preserved order and represent schema columns.int
size()
Total number of fields (columns) in the schema.-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
-
-
-
Method Detail
-
get
public Field get(int index)
Get schema field by index.
-
getIndex
public int getIndex(String name)
Get schema field's index by name.- Parameters:
name
- field (column) name
-
size
public int size()
Total number of fields (columns) in the schema.- Specified by:
size
in interfaceCollection<Field>
- Specified by:
size
in interfaceList<Field>
- Specified by:
size
in classAbstractCollection<Field>
-
of
public static FieldList of(Field... fields)
Returns a newFieldList
object, which contains a collection ofField
objects in preserved order and represent schema columns.- Parameters:
fields
- the schema fields
-
-