|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 String
s 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(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()
|
void |
setFirst(T first)
|
void |
setSecond(U second)
|
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(Object other)
equals
in class Object
public int hashCode()
Combining the hash code(s) computed above: result = 37 * result + code;
hashCode
in class Object
Object.hashCode()
public String toString()
toString
in class Object
public boolean hasNull()
null
public boolean isNull()
null
public T getFirst()
public U getSecond()
public void setFirst(T first)
public void setSecond(U second)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |