Class 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:
  • Method Details

    • get

      public Field get(int index)
      Get schema field by index.
      Specified by:
      get in interface List<Field>
      Specified by:
      get in class AbstractList<Field>
      Parameters:
      index - field (column) index
    • get

      public Field get(String name)
      Get schema field by name.
      Parameters:
      name - field (column) name
    • 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 interface Collection<Field>
      Specified by:
      size in interface List<Field>
      Specified by:
      size in class AbstractCollection<Field>
    • of

      public static FieldList of(Field... fields)
      Returns a new FieldList object, which contains a collection of Field objects in preserved order and represent schema columns.
      Parameters:
      fields - the schema fields
    • of

      public static FieldList of(Iterable<Field> fields)
      Returns a new FieldList object, which contains a collection of Field objects in preserved order and represent schema columns.
      Parameters:
      fields - the schema fields