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 Fieldget(int index)Get schema field by index.Fieldget(String name)Get schema field by name.intgetIndex(String name)Get schema field's index by name.static FieldListof(Field... fields)Returns a newFieldListobject, which contains a collection ofFieldobjects in preserved order and represent schema columns.static FieldListof(Iterable<Field> fields)Returns a newFieldListobject, which contains a collection ofFieldobjects in preserved order and represent schema columns.intsize()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:
sizein interfaceCollection<Field>- Specified by:
sizein interfaceList<Field>- Specified by:
sizein classAbstractCollection<Field>
-
of
public static FieldList of(Field... fields)
Returns a newFieldListobject, which contains a collection ofFieldobjects in preserved order and represent schema columns.- Parameters:
fields- the schema fields
-
-