org.apache.avro.generic
Class GenericData.Array<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
org.apache.avro.generic.GenericData.Array<T>
- All Implemented Interfaces:
- Comparable<GenericArray<T>>, Iterable<T>, Collection<T>, List<T>, GenericArray<T>, GenericContainer
- Enclosing class:
- GenericData
public static class GenericData.Array<T>
- extends AbstractList<T>
- implements GenericArray<T>, Comparable<GenericArray<T>>
Default implementation of an array.
Methods inherited from interface java.util.List |
add, addAll, addAll, contains, containsAll, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray |
GenericData.Array
public GenericData.Array(int capacity,
Schema schema)
getSchema
public Schema getSchema()
- Description copied from interface:
GenericContainer
- The schema of this instance.
- Specified by:
getSchema
in interface GenericContainer
size
public int size()
- Specified by:
size
in interface Collection<T>
- Specified by:
size
in interface List<T>
- Specified by:
size
in class AbstractCollection<T>
clear
public void clear()
- Specified by:
clear
in interface Collection<T>
- Specified by:
clear
in interface List<T>
- Overrides:
clear
in class AbstractList<T>
iterator
public Iterator<T> iterator()
- Specified by:
iterator
in interface Iterable<T>
- Specified by:
iterator
in interface Collection<T>
- Specified by:
iterator
in interface List<T>
- Overrides:
iterator
in class AbstractList<T>
get
public T get(int i)
- Specified by:
get
in interface List<T>
- Specified by:
get
in class AbstractList<T>
add
public boolean add(T o)
- Specified by:
add
in interface Collection<T>
- Specified by:
add
in interface List<T>
- Overrides:
add
in class AbstractList<T>
peek
public T peek()
- Description copied from interface:
GenericArray
- The current content of the location where
List.add(Object)
would next
store an element, if any. This permits reuse of arrays and their elements
without allocating new objects.
- Specified by:
peek
in interface GenericArray<T>
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Collection<T>
- Specified by:
hashCode
in interface List<T>
- Overrides:
hashCode
in class AbstractList<T>
equals
public boolean equals(Object o)
- Specified by:
equals
in interface Collection<T>
- Specified by:
equals
in interface List<T>
- Overrides:
equals
in class AbstractList<T>
compareTo
public int compareTo(GenericArray<T> that)
- Specified by:
compareTo
in interface Comparable<GenericArray<T>>
reverse
public void reverse()
- Description copied from interface:
GenericArray
- Reverses the order of the elements in this array.
- Specified by:
reverse
in interface GenericArray<T>
toString
public String toString()
- Overrides:
toString
in class AbstractCollection<T>
Copyright © 2010 The Apache Software Foundation