|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
tl.lin.data.array.ArrayListWritableComparable<E>
E - type of list elementpublic class ArrayListWritableComparable<E extends org.apache.hadoop.io.WritableComparable>
WritableComparable extension of a Java ArrayList. Elements in the list must be homogeneous and must implement Hadoop's WritableComparable interface.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
ArrayListWritableComparable()
Creates an ArrayListWritableComparable object. |
|
ArrayListWritableComparable(ArrayList<E> array)
Creates an ArrayListWritableComparable object from a regular ArrayList. |
|
| Method Summary | |
|---|---|
int |
compareTo(ArrayListWritableComparable<E> obj)
Defines a natural sort order for the ListWritable class. |
void |
readFields(DataInput in)
Deserializes the array. |
String |
toString()
Generates human-readable String representation of this ArrayList. |
void |
write(DataOutput out)
Serializes this array. |
| 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 |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public ArrayListWritableComparable()
public ArrayListWritableComparable(ArrayList<E> array)
| Method Detail |
|---|
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.Writablein - source for raw byte representation
IOException
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.Writableout - where to write the raw byte representation
IOExceptionpublic int compareTo(ArrayListWritableComparable<E> obj)
Defines a natural sort order for the ListWritable class. Following standard convention, this
method returns a value less than zero, a value greater than zero, or zero if this ListWritable
should be sorted before, sorted after, or is equal to obj. The sort order is
defined as follows:
compareTo method.
compareTo in interface Comparable<ArrayListWritableComparable<E extends org.apache.hadoop.io.WritableComparable>>obj.public String toString()
toString in class AbstractCollection<E extends org.apache.hadoop.io.WritableComparable>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||