public class Pair<First,Second>
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Pair() |
Pair(First first,
Second second) |
| Modifier and Type | Method and Description |
|---|---|
static <F,S> Pair<F,S> |
create(F first,
S second)
Create a new pair with the given values
|
static <F,S> Pair<F,S> |
createOnlyFirst(F first)
Create a new pair with the given first value and null as second
|
static <F,S> Pair<F,S> |
createOnlySecond(S second)
Create a new pair with null as first and the given second value
|
boolean |
equals(java.lang.Object obj) |
First |
getFirst() |
Second |
getSecond() |
int |
hashCode() |
void |
setFirst(First first) |
void |
setSecond(Second second) |
java.lang.String |
toString() |
public static <F,S> Pair<F,S> create(F first, S second)
public static <F,S> Pair<F,S> createOnlyFirst(F first)
public static <F,S> Pair<F,S> createOnlySecond(S second)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic First getFirst()
public Second getSecond()
public int hashCode()
hashCode in class java.lang.Objectpublic void setFirst(First first)
public void setSecond(Second second)
public java.lang.String toString()
toString in class java.lang.Object