public class ArrayListOfIntsWritable extends ArrayListOfInts implements org.apache.hadoop.io.WritableComparable<ArrayListOfIntsWritable>
ArrayListOfInts class. This class provides an efficient data
structure to store a list of ints for MapReduce jobs.array, size| Constructor and Description |
|---|
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).
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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, trimToSizefinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic ArrayListOfIntsWritable()
public ArrayListOfIntsWritable(int initialCapacity)
initialCapacity - the initial capacity of the listpublic 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 arraypublic void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.Writablein - source for raw byte representationIOExceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.Writableout - where to write the raw byte representationIOExceptionpublic 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 againstCopyright © 2018. All rights reserved.