|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttl.lin.data.array.ArrayListOfInts
tl.lin.data.array.ArrayListOfIntsWritable
public class ArrayListOfIntsWritable
Writable extension of the ArrayListOfInts class. This class provides an efficient data
structure to store a list of ints for MapReduce jobs.
| Field Summary |
|---|
| Fields inherited from class tl.lin.data.array.ArrayListOfInts |
|---|
array, size |
| Constructor Summary | |
|---|---|
ArrayListOfIntsWritable()
Constructs an ArrayListOfIntsWritable object. |
|
ArrayListOfIntsWritable(ArrayListOfIntsWritable other)
Constructs a deep copy of the ArrayListOfIntsWritable object given as parameter. |
|
ArrayListOfIntsWritable(int initialCapacity)
Constructs an empty list with the specified initial capacity. |
|
ArrayListOfIntsWritable(int[] arr)
Constructs a list from an array. |
|
ArrayListOfIntsWritable(int first,
int last)
Constructs a list populated with shorts in range [first, last). |
|
| Method Summary | |
|---|---|
int |
compareTo(ArrayListOfIntsWritable obj)
Elementwise comparison. |
static ArrayListOfIntsWritable |
fromArrayListOfInts(ArrayListOfInts a)
Creates a Writable version of this list. |
void |
readFields(DataInput in)
Deserializes this object. |
String |
toString()
|
void |
write(DataOutput out)
Serializes this object. |
| Methods inherited from class tl.lin.data.array.ArrayListOfInts |
|---|
add, add, addUnique, clear, clone, contains, ensureCapacity, equals, get, getArray, indexOf, intersection, isEmpty, iterator, lastIndexOf, merge, mergeNoDuplicates, remove, set, setSize, shiftLastNToTop, size, sort, subList, toString, trimToSize |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayListOfIntsWritable()
public ArrayListOfIntsWritable(int initialCapacity)
initialCapacity - the initial capacity of the list
public ArrayListOfIntsWritable(int first,
int last)
first - the smallest short in the range (inclusive)last - the largest short in the range (exclusive)public ArrayListOfIntsWritable(ArrayListOfIntsWritable other)
other - object to be copiedpublic ArrayListOfIntsWritable(int[] arr)
arr - source 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 String toString()
toString in class ArrayListOfIntspublic static ArrayListOfIntsWritable fromArrayListOfInts(ArrayListOfInts a)
public int compareTo(ArrayListOfIntsWritable obj)
compareTo in interface Comparable<ArrayListOfIntsWritable>obj - other object this is compared against
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||