Package org.apache.avro.generic
Interface GenericArray<T>
- All Superinterfaces:
Collection<T>
,GenericContainer
,Iterable<T>
,List<T>
- All Known Implementing Classes:
GenericData.AbstractArray
,GenericData.Array
,PrimitivesArrays.BooleanArray
,PrimitivesArrays.DoubleArray
,PrimitivesArrays.FloatArray
,PrimitivesArrays.IntArray
,PrimitivesArrays.LongArray
Array that permits reuse of contained elements.
-
Method Summary
Modifier and TypeMethodDescriptionpeek()
The current content of the location whereList.add(Object)
would next store an element, if any.default void
prune()
clean up reusable objects from array (if reset didn't already)default void
reset()
reset size counter of array to zerovoid
reverse()
Reverses the order of the elements in this array.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface org.apache.avro.generic.GenericContainer
getSchema
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Method Details
-
peek
T peek()The current content of the location whereList.add(Object)
would next store an element, if any. This permits reuse of arrays and their elements without allocating new objects. -
reset
default void reset()reset size counter of array to zero -
prune
default void prune()clean up reusable objects from array (if reset didn't already) -
reverse
void reverse()Reverses the order of the elements in this array.
-