|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ou.utils.Tuple<A,B>
public class Tuple<A,B>
A Tuple is simply a pair of objects. Tuples can be chained together to form lisp-like lists or trees, or can simply hold objects for a convenient return type for functions.
Constructor Summary | |
---|---|
Tuple(A head,
B tail)
|
Method Summary | |
---|---|
A |
head()
Get the first element of the tuple. |
void |
setHead(A head)
Set the first element of the tuple. |
void |
setTail(B tail)
Set the second element of the tuple. |
B |
tail()
Get the second element of the tuple. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tuple(A head, B tail)
Method Detail |
---|
public void setHead(A head)
head
- The new first element of the tuple.public A head()
public void setTail(B tail)
tail
- The new second element of the tuple.public B tail()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |