|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectapollo.util.Pair<T,U>
T - - the type of the first valueU - - the type of the second valuepublic class Pair<T,U>
This is an utility class to give pairs and uses generics
| Constructor Summary | |
|---|---|
Pair(T first,
U second)
Constructs a Pair object containing two elements |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object other)
Overload Object.equals to compare if the two elements are the same |
T |
getFirst()
Get the first value |
U |
getSecond()
Get the second value |
int |
hashCode()
Overload Object.hashCode to return the sum of the the values hashCode |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Pair(T first,
U second)
first - - first value of the pairsecond - - second value of the pair| Method Detail |
|---|
public T getFirst()
public U getSecond()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - - instance of Pair being compared to
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||