|
com.im.commons 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.im.commons.Pair<P,K>
public final class Pair<P,K>
2-tuple utility object. The elements of the 2-tuple might be null.
| Field Summary | |
|---|---|
P |
first
|
K |
second
|
| Method Summary | ||
|---|---|---|
boolean |
areBothNull()
|
|
boolean |
equals(Object other)
Checks the two objects for equality by delegating to their respective equals() methods. |
|
int |
hashCode()
Compute a hash code using the hash codes of the underlying objects. |
|
boolean |
isEitherNull()
|
|
static
|
of(P first,
K second)
Constructor for a Pair. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final P first
public final K second
| Method Detail |
|---|
public static <P,K> Pair<P,K> of(P first,
K second)
first - the first object in the Pairsecond - the second object in the pairpublic boolean areBothNull()
null.public boolean isEitherNull()
null.public int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Objectother - the Pair to which this one is to be checked for equality
public String toString()
toString in class Object
|
com.im.commons 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||