public class ArrayListOfShortsWritable extends ArrayListOfShorts implements org.apache.hadoop.io.WritableComparable<ArrayListOfShortsWritable>
ArrayListOfShorts class. This class provides an efficient data
structure to store a list of shorts for MapReduce jobs.array, size| Constructor and Description |
|---|
ArrayListOfShortsWritable()
Constructs an ArrayListOfIntsWritable object.
|
ArrayListOfShortsWritable(ArrayListOfShortsWritable other)
Constructs a deep copy of the ArrayListOfShortsWritable object given as parameter.
|
ArrayListOfShortsWritable(int initialCapacity)
Constructs an empty list with the specified initial capacity.
|
ArrayListOfShortsWritable(short[] arr)
Constructs a list from an array.
|
ArrayListOfShortsWritable(short first,
short last)
Constructs a list populated with shorts in range [first, last).
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ArrayListOfShortsWritable obj)
Elementwise comparison.
|
static ArrayListOfShortsWritable |
fromArrayListOfShorts(ArrayListOfShorts 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, trimToSizepublic ArrayListOfShortsWritable()
public ArrayListOfShortsWritable(int initialCapacity)
initialCapacity - the initial capacity of the listpublic ArrayListOfShortsWritable(short first,
short last)
first - the smallest short in the range (inclusive)last - the largest short in the range (exclusive)public ArrayListOfShortsWritable(ArrayListOfShortsWritable other)
other - object to be copiedpublic ArrayListOfShortsWritable(short[] 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 ArrayListOfShortspublic static ArrayListOfShortsWritable fromArrayListOfShorts(ArrayListOfShorts a)
public int compareTo(ArrayListOfShortsWritable obj)
compareTo in interface Comparable<ArrayListOfShortsWritable>obj - other object this is compared againstCopyright © 2014. All rights reserved.