public class Pair<F,S> extends Object implements 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(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
|
String |
toString()
Returns "first/second"
|
public F first
public S second
Copyright © 2018. All rights reserved.