|
||||||||||
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(Iterable<String> entries)
|
|
StringTuple(String firstEntry)
|
|
StringTuple(String[] entries)
|
Method Summary | |
---|---|
boolean |
add(String entry)
add an entry to the end of the list |
int |
compareTo(StringTuple otherTuple)
|
boolean |
equals(Object obj)
|
List<String> |
getEntries()
Fetch the list of entries from the tuple |
int |
hashCode()
|
int |
length()
Returns the length of the tuple |
void |
readFields(DataInput in)
|
String |
replaceAt(int index,
String newString)
Replaces the string at the given index with the given newString |
String |
stringAt(int index)
Fetches the string at the given location |
String |
toString()
|
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StringTuple()
public StringTuple(String firstEntry)
public StringTuple(Iterable<String> entries)
public StringTuple(String[] entries)
Method Detail |
---|
public boolean add(String entry)
entry
-
public String stringAt(int index)
index
-
public String replaceAt(int index, String newString)
index
- newString
-
public List<String> 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(StringTuple otherTuple)
compareTo
in interface Comparable<StringTuple>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |