public final class ComparablePair extends Object implements Comparable
| Constructor and Description |
|---|
ComparablePair(Comparable first,
Comparable second)
Make a new one.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object aThat) |
boolean |
equals(Object other)
Override of equals.
|
Object |
getFirst()
Get the first member of the tuple.
|
Object |
getSecond()
Get the second member of the tuple.
|
int |
hashCode()
Override of hashCode.
|
String |
toString() |
public ComparablePair(Comparable first, Comparable second)
first - The first member.second - The second member.public Object getFirst()
public Object getSecond()
public boolean equals(Object other)
public int compareTo(Object aThat)
compareTo in interface ComparableComparable.compareTo(java.lang.Object)public String toString()
toString in class ObjectObject.toString()Copyright © 2014. All rights reserved.