E
- type of list elementpublic class ArrayListWritableComparable<E extends org.apache.hadoop.io.WritableComparable> extends ArrayList<E> implements org.apache.hadoop.io.WritableComparable<ArrayListWritableComparable<E>>
modCount
Constructor and Description |
---|
ArrayListWritableComparable()
Creates an ArrayListWritableComparable object.
|
ArrayListWritableComparable(ArrayList<E> array)
Creates an ArrayListWritableComparable object from a regular ArrayList.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ArrayListWritableComparable<E> obj)
Defines a natural sort order for the ListWritable class.
|
void |
readFields(DataInput in)
Deserializes the array.
|
String |
toString()
Generates human-readable String representation of this ArrayList.
|
void |
write(DataOutput out)
Serializes this array.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public ArrayListWritableComparable()
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
in
- source for raw byte representationIOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
out
- where to write the raw byte representationIOException
public int compareTo(ArrayListWritableComparable<E> obj)
Defines a natural sort order for the ListWritable class. Following standard convention, this
method returns a value less than zero, a value greater than zero, or zero if this ListWritable
should be sorted before, sorted after, or is equal to obj
. The sort order is
defined as follows:
compareTo
method.compareTo
in interface Comparable<ArrayListWritableComparable<E extends org.apache.hadoop.io.WritableComparable>>
obj
.public String toString()
toString
in class AbstractCollection<E extends org.apache.hadoop.io.WritableComparable>
Copyright © 2018. All rights reserved.