public final class StringTuple extends Object implements org.apache.hadoop.io.WritableComparable<StringTuple>
Constructor and Description |
---|
StringTuple() |
StringTuple(Iterable<String> entries) |
StringTuple(String firstEntry) |
StringTuple(String[] entries) |
Modifier and Type | Method and Description |
---|---|
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) |
public StringTuple()
public StringTuple(String firstEntry)
public StringTuple(String[] entries)
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 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>
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.