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.boolean
Returnstrue
if schema is provided,false
otherwise.static FieldValueList
of
(List<FieldValue> row, Field... schema) Creates an instance ofFieldValueList
, useful for testing.static FieldValueList
of
(List<FieldValue> row, FieldList schema) Creates an instance ofFieldValueList
, useful for testing.int
size()
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, 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 Details
-
get
Gets field value by index.- Specified by:
get
in interfaceList<FieldValue>
- Specified by:
get
in 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 ifname
was not found in the schema
-
hasSchema
public boolean hasSchema()Returnstrue
if schema is provided,false
otherwise. -
size
public int size()Returns the total number of field values in the row.- Specified by:
size
in interfaceCollection<FieldValue>
- Specified by:
size
in interfaceList<FieldValue>
- Specified by:
size
in 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.
-