T - The type of the first elementT2 - The type of the second elementpublic class Pair<T,T2> extends Object
| Constructor and Description |
|---|
Pair()
Standard constructor, which initializes the two values to null.
|
Pair(T a,
T2 b)
Specific constructor, which initializes the two values to the two values
passed as parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
T |
getA()
Returns the pointer to the first object.
|
T2 |
getB()
Returns the pointer to the second object.
|
int |
hashCode() |
void |
setA(T a)
Sets the first object
|
void |
setB(T2 b)
Sets the second object
|
String |
toString() |
public Pair()
public T getA()
public void setA(T a)
a - New pointer for the first objectpublic T2 getB()
public void setB(T2 b)
b - New pointer for the second objectCopyright © 2015. All Rights Reserved.