
A - the first value typeB - the second value type@Externalize(value=Pair.Externalizer.class) public final class Pair<A,B> extends java.lang.Object implements java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Pair.Externalizer
An externalizer for
Pair instances. |
| Modifier and Type | Method and Description |
|---|---|
static <A,B> Pair<A,B> |
create(A a,
B b)
Create a new instance.
|
boolean |
equals(java.lang.Object other)
Determine if this pair equals another.
|
boolean |
equals(Pair<?,?> other)
Determine if this pair equals another.
|
A |
getA()
Get the first value.
|
B |
getB()
Get the second value.
|
int |
hashCode()
Return the combined hash code of the two argument objects.
|
java.lang.String |
toString()
Get a string representation of this pair.
|
public A getA()
public B getB()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - the other pairtrue if they are equal, false otherwisepublic boolean equals(Pair<?,?> other)
other - the other pairtrue if they are equal, false otherwisepublic java.lang.String toString()
toString in class java.lang.Objectpublic static <A,B> Pair<A,B> create(A a, B b)
A - the first value typeB - the second value typea - the first valueb - the second valueCopyright © 2011 JBoss, a division of Red Hat, Inc.