|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectPair<A,B>
A - The type of the first value.B - The type of the second value.public class Pair<A,B>
A pair consists of two values of type A and B.
| Constructor Summary | |
|---|---|
Pair(A a,
B b)
Create a new pair with the two values a and b. |
|
| Method Summary | |
|---|---|
A |
first()
Selector of the first value |
B |
second()
Selector of the second value |
void |
setfirst(A a)
Setter for first value |
void |
setsecond(B b)
Setter for second value |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Pair(A a,
B b)
a - the first valueb - the second value| Method Detail |
|---|
public void setfirst(A a)
a - the new first valuepublic void setsecond(B b)
b - the new second valuepublic A first()
public B second()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||