public class ArrayListOfLongsWritable extends ArrayListOfLongs implements org.apache.hadoop.io.WritableComparable<ArrayListOfLongsWritable>
ArrayListOfLongs class. This class provides an efficient data
structure to store a list of longs for MapReduce jobs.array, size| Constructor and Description |
|---|
ArrayListOfLongsWritable()
Constructs an ArrayListOfLongsWritable object.
|
ArrayListOfLongsWritable(ArrayListOfLongsWritable other)
Constructs a deep copy of the ArrayListOfLongsWritable object given as parameter.
|
ArrayListOfLongsWritable(int initialCapacity)
Constructs an empty list with the specified initial capacity.
|
ArrayListOfLongsWritable(int first,
int last)
Constructs a list populated with shorts in range [first, last).
|
ArrayListOfLongsWritable(long[] arr)
Constructs a list from an array.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ArrayListOfLongsWritable obj)
Elementwise comparison.
|
static ArrayListOfLongsWritable |
fromArrayListOfLongs(ArrayListOfLongs 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, remove, set, setSize, shiftLastNToTop, size, sort, subList, toString, trimToSizefinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic ArrayListOfLongsWritable()
public ArrayListOfLongsWritable(int initialCapacity)
initialCapacity - the initial capacity of the listpublic ArrayListOfLongsWritable(int first,
int last)
first - the smallest short in the range (inclusive)last - the largest short in the range (exclusive)public ArrayListOfLongsWritable(ArrayListOfLongsWritable other)
other - object to be copiedpublic ArrayListOfLongsWritable(long[] 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 ArrayListOfLongspublic static ArrayListOfLongsWritable fromArrayListOfLongs(ArrayListOfLongs a)
public int compareTo(ArrayListOfLongsWritable obj)
compareTo in interface Comparable<ArrayListOfLongsWritable>obj - other object this is compared againstCopyright © 2018. All rights reserved.