|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.generationjava.util.Pair
A Lisp like Pair object.
| Constructor Summary | |
Pair(java.lang.Object one)
A Pair with only one object. |
|
Pair(java.lang.Object one,
int weighting)
A Pair with only one object of a specific weighting. |
|
Pair(java.lang.Object one,
java.lang.Object two)
A Pair with two Objects of equal weighting. |
|
Pair(java.lang.Object one,
java.lang.Object two,
int weighting1,
int weighting2)
A Pair with two Objects, weighted with the weightings given. |
|
Pair(com.generationjava.util.Pair one,
com.generationjava.util.Pair two)
Create a Pair with two Pairs in it. |
|
| Method Summary | |
java.lang.Object |
car()
Get the first element of this Pair. |
int |
carWeighting()
Get the weighting of the first element of this Pair. |
java.lang.Object |
cdr()
Get the second element of this Pair. |
int |
cdrWeighting()
Get the weighting of the second element of this Pair. |
java.lang.String |
dumpTree()
Create a String version of a tree of pairs. |
java.lang.String |
dumpTree(com.generationjava.util.Pair pair)
Create a String version of a tree of pairs using this start pair. |
java.lang.String |
toString()
Simple debug version of this Pair. |
int |
weighting()
Get the combined weighting of this Pair. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Pair(com.generationjava.util.Pair one,
com.generationjava.util.Pair two)
public Pair(java.lang.Object one,
java.lang.Object two,
int weighting1,
int weighting2)
public Pair(java.lang.Object one,
java.lang.Object two)
public Pair(java.lang.Object one,
int weighting)
public Pair(java.lang.Object one)
| Method Detail |
public java.lang.String dumpTree()
public java.lang.String dumpTree(com.generationjava.util.Pair pair)
public int weighting()
public int carWeighting()
public int cdrWeighting()
public java.lang.Object car()
public java.lang.Object cdr()
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 | ||||||||||