public class TripleOfIntsString extends Object implements org.apache.hadoop.io.WritableComparable<TripleOfIntsString>
WritableComparable representing a pair of integers. The elements in the pair are referred to as the left and right elements. The natural sort order is: first by the left element, and then by the right element.
| Modifier and Type | Class and Description |
|---|---|
static class |
TripleOfIntsString.Comparator
Comparator optimized for
PairOfInts. |
| Constructor and Description |
|---|
TripleOfIntsString()
Creates a ThreeInts instance.
|
TripleOfIntsString(int left,
int middle,
String right)
Creates a pair.
|
| Modifier and Type | Method and Description |
|---|---|
TripleOfIntsString |
clone()
Clones this object.
|
int |
compareTo(TripleOfIntsString obj)
Defines a natural sort order for pairs.
|
boolean |
equals(Object obj)
Checks two ThreeInts for equality.
|
int |
getLeftElement()
Returns the left element.
|
int |
getMiddleElement()
Returns the middle element.
|
String |
getRightElement()
Returns the right element.
|
int |
hashCode()
Returns a hash code value for this ThreeInts instance.
|
void |
readFields(DataInput in)
Deserializes this ThreeInts instance.
|
void |
set(int left,
int middle,
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 ThreeInts instance.
|
public TripleOfIntsString()
public TripleOfIntsString(int left,
int middle,
String right)
left - the left elementmiddle - the middle 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 int getMiddleElement()
public String getRightElement()
public void set(int left,
int middle,
String right)
left - the left elementmiddle - the middle elementright - the right elementpublic boolean equals(Object obj)
public int compareTo(TripleOfIntsString obj)
compareTo in interface Comparable<TripleOfIntsString>obj.public int hashCode()
public String toString()
public TripleOfIntsString clone()
Copyright © 2015. All rights reserved.