public class Pair<F,S>
extends java.lang.Object
Pair
provides a convenient means for pairing
two objects of any type.Modifier and Type | Field and Description |
---|---|
(package private) static long |
serialVersionUID |
Constructor and Description |
---|
Pair(F f,
S s)
Constructor for a pair of Objects.
|
Modifier and Type | Method and Description |
---|---|
F |
getFirst()
Returns the first object in the pair.
|
S |
getSecond()
Returns the second object in the pair.
|
void |
setFirst(F first) |
void |
setSecond(S second) |
java.lang.String |
toString()
Returns a string representation of the object.
|
java.lang.String |
toString(java.lang.String indent)
Returns a string representation of the object.
|
static final long serialVersionUID
public F getFirst()
public void setFirst(F first)
public S getSecond()
public void setSecond(S second)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String indent)
indent
- A string prepended to each line of text. Allows you to indent the
string representation for printing.