|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cloud9.util.array.ArrayListOfShorts
edu.umd.cloud9.io.array.ArrayListOfShortsWritable
public class ArrayListOfShortsWritable
Writable extension of the ArrayListOfShorts class. This class allows the user to have an efficient data structure to store a list of integers in MapReduce tasks. It is especially useful for storing index lists, as it has an efficient intersection method.
| Constructor Summary | |
|---|---|
ArrayListOfShortsWritable()
Constructs an ArrayListOfIntsWritable object. |
|
ArrayListOfShortsWritable(ArrayListOfShortsWritable other)
Constructs a deep copy of the ArrayListOfIntsWritable object given as parameter. |
|
ArrayListOfShortsWritable(int initialCapacity)
Constructs an empty list with the specified initial capacity. |
|
ArrayListOfShortsWritable(short[] perm)
|
|
ArrayListOfShortsWritable(short firstNumber,
short lastNumber)
Constructs an ArrayListOfIntsWritable object from a given integer range [ first , last ). |
|
| Method Summary | |
|---|---|
ArrayListOfShortsWritable |
intersection(ArrayListOfShortsWritable other)
Computes the intersection of two sorted lists of this type. |
void |
readFields(DataInput in)
Deserializes this object. |
String |
toString()
Generates human-readable String representation of this ArrayList. |
void |
write(DataOutput out)
Serializes this object. |
| Methods inherited from class edu.umd.cloud9.util.array.ArrayListOfShorts |
|---|
add, add, clear, clone, contains, ensureCapacity, get, getArray, indexOf, isEmpty, iterator, lastIndexOf, remove, set, setSize, size, toString, trimToSize |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayListOfShortsWritable()
public ArrayListOfShortsWritable(short firstNumber,
short lastNumber)
firstNumber - the smallest integer in the rangelastNumber - the largest integer in the rangepublic ArrayListOfShortsWritable(int initialCapacity)
initialCapacity - the initial capacity of the listpublic ArrayListOfShortsWritable(ArrayListOfShortsWritable other)
other - object to be copiedpublic ArrayListOfShortsWritable(short[] perm)
| Method Detail |
|---|
public void readFields(DataInput in)
throws IOException
readFields in interface Writablein - source for raw byte representation
IOException
public void write(DataOutput out)
throws IOException
write in interface Writableout - where to write the raw byte representation
IOExceptionpublic String toString()
toString in class ArrayListOfShortspublic ArrayListOfShortsWritable intersection(ArrayListOfShortsWritable other)
other.
other - other ArrayListOfIntsWritable that is intersected with this object
other and this object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||