|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.util.Pair
public class Pair
This class implements a tuple. Pairs keep related objects together. Pairs are essentially nodes of a b-tree. N-tuples can be implemented by an unbalanced b-tree.
| Constructor Summary | |
|---|---|
Pair()
|
|
Pair(java.lang.Object theFirst,
java.lang.Object theSecond)
This constructor sets the first and second objects with the parameters. |
|
| Method Summary | |
|---|---|
java.lang.Object |
first()
Returns the first object in the pair |
static java.lang.String |
makeString(Pair thePair)
tries to construct the pair (first and second) from a string |
java.lang.Object |
second()
Returns the second object in the pair |
void |
setFirst(java.lang.Object theObject)
Sets the first object of the pair |
void |
setSecond(java.lang.Object theObject)
Sets the second object of the pair |
java.lang.String |
toString()
overrides Object.toString(), prints: (first,second) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Pair()
public Pair(java.lang.Object theFirst,
java.lang.Object theSecond)
| Method Detail |
|---|
public java.lang.Object first()
public java.lang.Object second()
public void setFirst(java.lang.Object theObject)
public void setSecond(java.lang.Object theObject)
public java.lang.String toString()
toString in class java.lang.Objectpublic static java.lang.String makeString(Pair thePair)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||