tl.lin.data.array
Class ArrayListWritable<E extends org.apache.hadoop.io.Writable>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
tl.lin.data.array.ArrayListWritable<E>
- Type Parameters:
E - type of list element
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess, org.apache.hadoop.io.Writable
public class ArrayListWritable<E extends org.apache.hadoop.io.Writable>
- extends ArrayList<E>
- implements org.apache.hadoop.io.Writable
Writable extension of a Java ArrayList. Elements in the list must be homogeneous and must
implement Hadoop's Writable interface.
- See Also:
- Serialized Form
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
ArrayListWritable
public ArrayListWritable()
- Creates an ArrayListWritable object.
ArrayListWritable
public ArrayListWritable(ArrayList<E> array)
- Creates an ArrayListWritable object from an ArrayList.
readFields
public void readFields(DataInput in)
throws IOException
- Deserializes the array.
- Specified by:
readFields in interface org.apache.hadoop.io.Writable
- Parameters:
in - source for raw byte representation
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Serializes this array.
- Specified by:
write in interface org.apache.hadoop.io.Writable
- Parameters:
out - where to write the raw byte representation
- Throws:
IOException
toString
public String toString()
- Generates human-readable String representation of this ArrayList.
- Overrides:
toString in class AbstractCollection<E extends org.apache.hadoop.io.Writable>
- Returns:
- human-readable String representation of this ArrayList
Copyright © 2013. All Rights Reserved.