Package com.google.cloud.bigquery
Class FieldValueList
- All Implemented Interfaces:
Serializable,Iterable<FieldValue>,Collection<FieldValue>,List<FieldValue>
Google BigQuery Table Field Values class, which represents a row in returned query result (table
row). Tables rows can be retrieved as a result of a query or when listing table data.
Depending on how a corresponding query was executed, each row (an instance of
FieldValueList) may or may not contain related schema. If schema is not provided, the individual
cells of the row will still be accessible by index but not by name.
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Method Summary
Modifier and TypeMethodDescriptionget(int index) Gets field value by index.Gets field value by index.booleanReturnstrueif schema is provided,falseotherwise.static FieldValueListof(List<FieldValue> row, Field... schema) Creates an instance ofFieldValueList, useful for testing.static FieldValueListof(List<FieldValue> row, FieldList schema) Creates an instance ofFieldValueList, useful for testing.intsize()Returns the total number of field values in the row.Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, streamMethods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Method Details
-
get
Gets field value by index.- Specified by:
getin interfaceList<FieldValue>- Specified by:
getin classAbstractList<FieldValue>- Parameters:
index- field value index
-
get
Gets field value by index.- Parameters:
name- field name (defined in schema)- Throws:
IllegalArgumentException- if schema is not provided or ifnamewas not found in the schema
-
hasSchema
public boolean hasSchema()Returnstrueif schema is provided,falseotherwise. -
size
public int size()Returns the total number of field values in the row.- Specified by:
sizein interfaceCollection<FieldValue>- Specified by:
sizein interfaceList<FieldValue>- Specified by:
sizein classAbstractCollection<FieldValue>
-
of
Creates an instance ofFieldValueList, useful for testing.This method is unstable. See this discussion for more context.
-
of
Creates an instance ofFieldValueList, useful for testing.This method is unstable. See this discussion for more context.
-