A - the first value typeB - the second value typeSerializable@Externalize(Externalizer.class) public final class Pair<A,B> extends Object implements Serializable
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Pair.Externalizer |
An externalizer for
Pair instances. |
| Modifier and Type | Method | Description |
|---|---|---|
static <A,B> Pair<A,B> |
create(A a,
B b) |
Create a new instance.
|
boolean |
equals(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.
|
String |
toString() |
Get a string representation of this pair.
|
public A getA()
public B getB()
public int hashCode()
public boolean equals(Object other)
public boolean equals(Pair<?,?> other)
other - the other pairtrue if they are equal, false otherwisepublic String toString()
public 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 © 2018 JBoss by Red Hat. All rights reserved.