|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.common.IntegerTuple
public final class IntegerTuple
An Ordered List of Integers which can be used in a Hadoop Map/Reduce Job
Constructor Summary | |
---|---|
IntegerTuple()
|
|
IntegerTuple(Integer firstEntry)
|
|
IntegerTuple(Integer[] entries)
|
|
IntegerTuple(Iterable<Integer> entries)
|
Method Summary | |
---|---|
boolean |
add(Integer entry)
add an entry to the end of the list |
int |
compareTo(IntegerTuple otherTuple)
|
boolean |
equals(Object obj)
|
List<Integer> |
getEntries()
Fetch the list of entries from the tuple |
int |
hashCode()
|
Integer |
integerAt(int index)
Fetches the string at the given location |
int |
length()
Returns the length of the tuple |
void |
readFields(DataInput in)
|
Integer |
replaceAt(int index,
Integer newInteger)
Replaces the string at the given index with the given newString |
String |
toString()
|
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntegerTuple()
public IntegerTuple(Integer firstEntry)
public IntegerTuple(Iterable<Integer> entries)
public IntegerTuple(Integer[] entries)
Method Detail |
---|
public boolean add(Integer entry)
entry
-
public Integer integerAt(int index)
index
-
public Integer replaceAt(int index, Integer newInteger)
index
- newInteger
-
public List<Integer> getEntries()
public int length()
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public int compareTo(IntegerTuple otherTuple)
compareTo
in interface Comparable<IntegerTuple>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |