public class Pair<F,S>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected F |
first
First element of the pair.
|
protected S |
second
Second element of the pair.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Pair<S,F> other) |
boolean |
containsSomeElementOf(Pair<S,F> other) |
boolean |
equals(Pair<S,F> other) |
F |
first()
Get first element of the pair.
|
F |
getFirst()
Get first element of the pair.
|
S |
getSecond()
Get second element of the pair.
|
Pair<S,F> |
invert()
Invert the pair.
|
S |
second()
Get second element of the pair.
|
void |
set(F f,
S s)
Set elements of the pair.
|
java.lang.String |
toString()
Show par as String.
|
protected F first
protected S second
public F first()
public S second()
public F getFirst()
public S getSecond()
public java.lang.String toString()
toString
in class java.lang.Object
public void set(F f, S s)
f
- New first element of the pair.s
- New second element of the pair.public Pair<S,F> invert()