|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.commons.utils.Pair<T,U>
T - the first Object of the pairU - the second Object of the pairpublic class Pair<T,U>
Pair is a convenience class, which pairs two objects. For a pair of Strings see
StringPair.
| Field Summary | |
|---|---|
T |
first
first value of the pair. |
U |
second
second value of the pair. |
| Constructor Summary | |
|---|---|
Pair()
Create a pair with null objects. |
|
Pair(T first,
U second)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object other)
|
T |
getFirst()
|
U |
getSecond()
|
int |
hashCode()
Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast. |
boolean |
hasNull()
|
boolean |
isNull()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public T first
public U second
| Constructor Detail |
|---|
public Pair(T first,
U second)
first - value of the pair.second - value of the pair.public Pair()
| Method Detail |
|---|
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
Combining the hash code(s) computed above: result = 37 * result + code;
hashCode in class java.lang.ObjectObject.hashCode()public java.lang.String toString()
toString in class java.lang.Objectpublic boolean hasNull()
nullpublic boolean isNull()
nullpublic T getFirst()
public U getSecond()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||