|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cloud9.io.triple.TripleOfInts
public class TripleOfInts
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.
| Nested Class Summary | |
|---|---|
static class |
TripleOfInts.Comparator
Comparator optimized for TripleOfInts. |
| Constructor Summary | |
|---|---|
TripleOfInts()
Creates a TripleOnInts object. |
|
TripleOfInts(int left,
int middle,
int right)
Creates a TripleOnInts object. |
|
| Method Summary | |
|---|---|
TripleOfInts |
clone()
Clones this object. |
int |
compareTo(TripleOfInts obj)
Defines a natural sort order for pairs. |
boolean |
equals(Object obj)
Checks for equality. |
int |
getLeftElement()
Returns the left element. |
int |
getMiddleElement()
Returns the middle element. |
int |
getRightElement()
Returns the right element. |
int |
hashCode()
Returns a hash code value for this ThreeInts instance. |
void |
readFields(DataInput in)
Deserializes this object. |
void |
set(int left,
int middle,
int right)
Sets the elements of this triple. |
String |
toString()
Generates human-readable String representation of this pair. |
void |
write(DataOutput out)
Serializes this object. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TripleOfInts()
TripleOnInts object.
public TripleOfInts(int left,
int middle,
int right)
TripleOnInts object.
left - the left elementmiddle - the middle elementright - the right element| Method Detail |
|---|
public void readFields(DataInput in)
throws IOException
readFields in interface Writablein - source for raw byte representation
IOException
public void write(DataOutput out)
throws IOException
write in interface Writableout - where to write the raw byte representation
IOExceptionpublic int getLeftElement()
public int getMiddleElement()
public int getRightElement()
public void set(int left,
int middle,
int right)
left - the left elementmiddle - the middle elementright - the right elementpublic boolean equals(Object obj)
equals in class Objectobj - object for comparison
true if obj is equal to this object,
false otherwisepublic int compareTo(TripleOfInts obj)
compareTo in interface Comparable<TripleOfInts>obj.public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic TripleOfInts clone()
clone in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||