public class Pair<P,Q>
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Pair(Pair<? extends P,? extends Q> orig)
Creates an entry representing the same mapping as the
specified entry.
|
Pair(P p,
Q q) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compares the specified object with this entry for equality.
|
P |
getP() |
Q |
getQ() |
int |
hashCode() |
void |
setP(P p) |
void |
setQ(Q q) |
java.lang.String |
toString()
Returns a String representation of this map entry.
|
public void setP(P p)
public P getP()
public void setQ(Q q)
public Q getQ()
public boolean equals(java.lang.Object o)
true
if the given object is also a Pair and
the two entries represent the same Pair.equals
in class java.lang.Object
o
- object to be compared for equality with this map entrytrue
if the specified object is equal to this map
entryhashCode()
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object