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