public class PairOfIntString extends Object implements org.apache.hadoop.io.WritableComparable<PairOfIntString>
| Modifier and Type | Class and Description |
|---|---|
static class |
PairOfIntString.Comparator
Comparator optimized for
PairOfIntString. |
| Constructor and Description |
|---|
PairOfIntString()
Creates a pair.
|
PairOfIntString(int left,
String right)
Creates a pair.
|
| Modifier and Type | Method and Description |
|---|---|
PairOfIntString |
clone()
Clones this object.
|
int |
compareTo(PairOfIntString pair)
Defines a natural sort order for pairs.
|
boolean |
equals(Object obj)
Checks two pairs for equality.
|
int |
getKey()
Returns the key (left element).
|
int |
getLeftElement()
Returns the left element.
|
String |
getRightElement()
Returns the right element.
|
String |
getValue()
Returns the value (right element).
|
int |
hashCode()
Returns a hash code value for the pair.
|
void |
readFields(DataInput in)
Deserializes the pair.
|
void |
set(int left,
String right)
Sets the right and left elements of this pair.
|
String |
toString()
Generates human-readable String representation of this pair.
|
void |
write(DataOutput out)
Serializes this pair.
|
public PairOfIntString()
public PairOfIntString(int left,
String right)
left - the left elementright - the right elementpublic void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.Writablein - source for raw byte representationIOExceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.Writableout - where to write the raw byte representationIOExceptionpublic int getLeftElement()
public String getRightElement()
public int getKey()
public String getValue()
public void set(int left,
String right)
left - the left elementright - the right elementpublic boolean equals(Object obj)
public int compareTo(PairOfIntString pair)
compareTo in interface Comparable<PairOfIntString>obj.public int hashCode()
public String toString()
public PairOfIntString clone()
Copyright © 2018. All rights reserved.