# Class FieldValueList (2.65.0)

2.65.0 (latest) 2.62.0 2.61.0 2.60.0 2.59.0 2.58.0 2.57.2 2.56.0 2.55.3 2.54.2 2.53.0 2.52.0 2.51.0 2.50.1 2.49.0 2.48.1 2.47.0 2.46.0 2.45.0 2.44.0 2.43.3 2.42.3 2.41.0 2.40.3 2.39.1 2.38.2 2.37.2 2.36.0 2.35.0 2.34.2 2.33.2

    public class FieldValueList extends AbstractList<FieldValue> implements Serializable

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.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> java.util.AbstractCollection \> [AbstractList](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html) \> FieldValueList

## Implements

[Serializable](https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html)

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-) [AbstractCollection.\<T\>toArray(T\[\])](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html#toArray-T[]-) [AbstractCollection.addAll(Collection\<? extends E\>)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html#addAll-java.util.Collection<? extends E>-) [AbstractCollection.contains(Object)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html#contains-java.lang.Object-) [AbstractCollection.containsAll(Collection\<?\>)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html#containsAll-java.util.Collection<?>-) [AbstractCollection.isEmpty()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html#isEmpty--) [AbstractCollection.remove(Object)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html#remove-java.lang.Object-) [AbstractCollection.removeAll(Collection\<?\>)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html#removeAll-java.util.Collection<?>-) [AbstractCollection.retainAll(Collection\<?\>)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html#retainAll-java.util.Collection<?>-) [AbstractCollection.size()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html#size--) [AbstractCollection.toArray()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html#toArray--) [AbstractCollection.toString()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html#toString--) [AbstractList.add(E)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#add-E-) [AbstractList.add(int,E)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#add-int-E-) [AbstractList.addAll(int,Collection\<? extends E\>)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#addAll-int-java.util.Collection<? extends E>-) [AbstractList.clear()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#clear--) [AbstractList.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#equals-java.lang.Object-) [AbstractList.get(int)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#get-int-) [AbstractList.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#hashCode--) [AbstractList.indexOf(Object)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#indexOf-java.lang.Object-) [AbstractList.iterator()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#iterator--) [AbstractList.lastIndexOf(Object)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#lastIndexOf-java.lang.Object-) [AbstractList.listIterator()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#listIterator--) [AbstractList.listIterator(int)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#listIterator-int-) [AbstractList.remove(int)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#remove-int-) [AbstractList.removeRange(int,int)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#removeRange-int-int-) [AbstractList.set(int,E)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#set-int-E-) [AbstractList.subList(int,int)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#subList-int-int-)

## Static Methods

### of(List\<FieldValue\> row, Field\[\] schema)

    public static FieldValueList of(List<FieldValue> row, Field[] schema)

> [!WARNING]
> **Beta**
>
> This feature is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1) of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.

Creates an instance of `FieldValueList`, useful for testing.

This method is unstable. See [this discussion](https://github.com/googleapis/google-cloud-java/pull/2891) for more
context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `row` | `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FieldValue>` |
| `schema` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Field[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FieldValueList` |   |

### of(List\<FieldValue\> row, FieldList schema)

    public static FieldValueList of(List<FieldValue> row, FieldList schema)

> [!WARNING]
> **Beta**
>
> This feature is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1) of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.

Creates an instance of `FieldValueList`, useful for testing.

This method is unstable. See [this discussion](https://github.com/googleapis/google-cloud-java/pull/2891) for more
context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `row` | `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FieldValue>` |
| `schema` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FieldList` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FieldValueList` |   |

## Methods

### get(int index)

    public FieldValue get(int index)

Gets field value by index.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` field value index |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FieldValue` |   |

**Overrides** [AbstractList.get(int)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#get-int-)

### get(String name)

    public FieldValue get(String name)

Gets field value by index.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` field name (defined in schema) |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FieldValue` |   |

### hasSchema()

    public boolean hasSchema()

Returns `true` if schema is provided, `false` otherwise.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### size()

    public int size()

Returns the total number of field values in the row.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [AbstractCollection.size()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractCollection.html#size--)