public static class GenericData.Array<T> extends AbstractList<T> implements GenericArray<T>, Comparable<GenericArray<T>>
modCount
Constructor and Description |
---|
GenericData.Array(int capacity,
Schema schema) |
GenericData.Array(Schema schema,
Collection<T> c) |
Modifier and Type | Method and Description |
---|---|
void |
add(int location,
T o) |
boolean |
add(T o) |
void |
clear() |
int |
compareTo(GenericArray<T> that) |
T |
get(int i) |
Schema |
getSchema()
The schema of this instance.
|
Iterator<T> |
iterator() |
T |
peek()
The current content of the location where
List.add(Object) would next
store an element, if any. |
T |
remove(int i) |
void |
reverse()
Reverses the order of the elements in this array.
|
T |
set(int i,
T o) |
int |
size() |
String |
toString() |
addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, removeRange, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, addAll, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, subList, toArray, toArray
public GenericData.Array(int capacity, Schema schema)
public GenericData.Array(Schema schema, Collection<T> c)
public Schema getSchema()
GenericContainer
getSchema
in interface GenericContainer
public int size()
size
in interface Collection<T>
size
in interface List<T>
size
in class AbstractCollection<T>
public void clear()
clear
in interface Collection<T>
clear
in interface List<T>
clear
in class AbstractList<T>
public T get(int i)
public boolean add(T o)
add
in interface Collection<T>
add
in interface List<T>
add
in class AbstractList<T>
public void add(int location, T o)
public T remove(int i)
public T peek()
GenericArray
List.add(Object)
would next
store an element, if any. This permits reuse of arrays and their elements
without allocating new objects.peek
in interface GenericArray<T>
public int compareTo(GenericArray<T> that)
compareTo
in interface Comparable<GenericArray<T>>
public void reverse()
GenericArray
reverse
in interface GenericArray<T>
public String toString()
toString
in class AbstractCollection<T>
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.