public class ArrayListOfDoublesWritable extends ArrayListOfDoubles implements org.apache.hadoop.io.WritableComparable<ArrayListOfDoublesWritable>
ArrayListOfDoubles class. This class provides an efficient data
structure to store a list of doubles for MapReduce jobs.array, size| Constructor and Description |
|---|
ArrayListOfDoublesWritable()
Constructs an
ArrayListOfDoublesWritable object. |
ArrayListOfDoublesWritable(ArrayListOfDoublesWritable other)
Constructs a deep copy of the
ArrayListOfDoublesWritable object given as parameter. |
ArrayListOfDoublesWritable(double[] arr)
Constructs a list from an array.
|
ArrayListOfDoublesWritable(int initialCapacity)
Constructs an empty list with the specified initial capacity.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ArrayListOfDoublesWritable obj)
Elementwise comparison.
|
static ArrayListOfDoublesWritable |
fromArrayListOfDoubles(ArrayListOfDoubles arr)
Creates an instance of this object from
ArrayListOfDoubles. |
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 ArrayListOfDoublesWritable()
ArrayListOfDoublesWritable object.public ArrayListOfDoublesWritable(int initialCapacity)
initialCapacity - the initial capacity of the listpublic ArrayListOfDoublesWritable(ArrayListOfDoublesWritable other)
ArrayListOfDoublesWritable object given as parameter.other - object to be copiedpublic ArrayListOfDoublesWritable(double[] 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 ArrayListOfDoublespublic static ArrayListOfDoublesWritable fromArrayListOfDoubles(ArrayListOfDoubles arr)
ArrayListOfDoubles. Note that backing array is
cloned.arr - source ArrayListOfDoublespublic int compareTo(ArrayListOfDoublesWritable obj)
compareTo in interface Comparable<ArrayListOfDoublesWritable>obj - other object this is compared againstCopyright © 2014. All rights reserved.