public class Pair<F,S> extends java.lang.Object implements java.lang.Comparable<Pair<F,S>>
| Modifier and Type | Field and Description |
|---|---|
F |
first
Holds the first component
|
S |
second
Holds the second component
|
| Constructor and Description |
|---|
Pair()
Constructs an empty pair
|
Pair(F first,
S second)
Constructs a Pair
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Pair<F,S> o) |
boolean |
equals(java.lang.Object obj) |
F |
first()
Returns the first
|
int |
hashCode() |
S |
second()
Returns the second
|
void |
setFirst(F first)
Sets the first
|
void |
setSecond(S second)
Sets the second
|
java.lang.String |
toString()
Returns "first/second"
|
public F first
public S second
public F first()
public void setFirst(F first)
public S second()
public void setSecond(S second)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object