public final class FieldList extends AbstractList<Field> implements Serializable
modCount
Modifier and Type | Method and Description |
---|---|
Field |
get(int index)
Get schema field by index.
|
Field |
get(String name)
Get schema field by name.
|
int |
getIndex(String name)
Get schema field's index by name.
|
static FieldList |
of(Field... fields)
Returns a new
FieldList object, which contains a collection of Field objects in
preserved order and represent schema columns. |
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. |
int |
size()
Total number of fields (columns) in the schema.
|
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public Field get(int index)
public int getIndex(String name)
name
- field (column) namepublic int size()
size
in interface Collection<Field>
size
in interface List<Field>
size
in class AbstractCollection<Field>
public static FieldList of(Field... fields)
FieldList
object, which contains a collection of Field
objects in
preserved order and represent schema columns.fields
- the schema fieldsCopyright © 2023 Google LLC. All rights reserved.