public static class GenericData.Array<T> extends AbstractList<T> implements GenericArray<T>, Comparable<GenericArray<T>>
modCount
Constructor and Description |
---|
Array(int capacity,
Schema schema) |
Array(Schema schema,
Collection<T> c) |
Modifier and Type | Method and Description |
---|---|
void |
add(int location,
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. |
void |
prune()
clean up reusable objects from array (if reset didn't already)
|
T |
remove(int i) |
void |
reset()
reset size counter of array to zero
|
void |
reverse()
Reverses the order of the elements in this array.
|
T |
set(int i,
T o) |
int |
size() |
add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, removeRange, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, addAll, addAll, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, removeAll, replaceAll, retainAll, sort, spliterator, subList, toArray, toArray
parallelStream, removeIf, stream
public Array(int capacity, Schema schema)
public 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 void reset()
GenericArray
reset
in interface GenericArray<T>
public void prune()
GenericArray
prune
in interface GenericArray<T>
public T get(int i)
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>
Copyright © 2009–2020 The Apache Software Foundation. All rights reserved.