org.apache.avro.generic
Interface GenericArray<T>

All Superinterfaces:
GenericContainer, Iterable<T>
All Known Implementing Classes:
GenericData.Array

public interface GenericArray<T>
extends Iterable<T>, GenericContainer

An array of objects.


Method Summary
 void add(T element)
          Add an element to this array.
 void clear()
          Reset the size of the array to zero.
 T peek()
          The current content of the location where add(Object) would next store an element, if any.
 long size()
          The number of elements contained in this array.
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface org.apache.avro.generic.GenericContainer
getSchema
 

Method Detail

size

long size()
The number of elements contained in this array.


clear

void clear()
Reset the size of the array to zero.


add

void add(T element)
Add an element to this array.


peek

T peek()
The current content of the location where add(Object) would next store an element, if any. This permits reuse of arrays and their elements without allocating new objects.



Copyright © 2010 The Apache Software Foundation