| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlrs.ANode
lrs.NENode
class NENode
Represents the non-empty state of a LStruct.
| Field Summary | |
|---|---|
| private  java.lang.Object | _datThe first data element of this LRStruct. | 
| private  LRStruct | _tailThe rest of this LRStruct. | 
| Constructor Summary | |
|---|---|
| NENode(java.lang.Object dat,
       LRStruct tail)Initializes this NENode to contain dat and a given tail list. | |
| Method Summary | |
|---|---|
| (package private)  java.lang.Object | execute(IAlgo algo,
        java.lang.Object input,
        LRStruct owner)Calls the visitor's non-empty case. | 
| (package private)  java.lang.Object | getFirst(LRStruct owner)Returns the first data object of the referencing LRStruct. | 
| (package private)  LRStruct | getRest(LRStruct owner)Returns the rest LRStruct of the referencing LRStruct. | 
| (package private)  LRStruct | insertFront(java.lang.Object dat,
            LRStruct owner)Inserts a data object at the front of the LRStruct owner. | 
| (package private)  java.lang.Object | removeFront(LRStruct owner)Removes and returns the first data object for the referencing LRStruct. | 
| (package private)  LRStruct | setFirst(java.lang.Object first,
         LRStruct owner)Sets a new first data object for the referencing LRStruct. | 
| (package private)  LRStruct | setRest(LRStruct tail,
        LRStruct owner)Sets a new rest for the referencing LRStruct. | 
| Methods inherited from class lrs.ANode | 
|---|
| toString | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
private java.lang.Object _dat
private LRStruct _tail
| Constructor Detail | 
|---|
NENode(java.lang.Object dat,
       LRStruct tail)
dat - the data object to be stored in this NENode.tail - the LRStruct tail of this NENode.| Method Detail | 
|---|
LRStruct getRest(LRStruct owner)
ANode
getRest in class ANodeowner - the LRStruct referencing this ANode.
java.lang.Object getFirst(LRStruct owner)
ANode
getFirst in class ANodeowner - the LRStruct referencing this ANode.
LRStruct setRest(LRStruct tail,
                 LRStruct owner)
ANode
setRest in class ANodetail - the new rest for the owner LRStruct.owner - the LRS referencing this ANode.
LRStruct owner
LRStruct setFirst(java.lang.Object first,
                  LRStruct owner)
ANode
setFirst in class ANodeowner - the LRS referencing this ANode.
LRStruct owner
LRStruct insertFront(java.lang.Object dat,
                     LRStruct owner)
insertFront in class ANodedat - the object to be inserted at the front.owner - the LRS referencing this NENode.
LRStruct ownerjava.lang.Object removeFront(LRStruct owner)
ANode
removeFront in class ANodeowner - the LRS referencing this ANode.
java.lang.Object execute(IAlgo algo,
                         java.lang.Object input,
                         LRStruct owner)
execute in class ANodealgo - the visitor algorithm to be executed.input - the input needed by the algorithm.owner - the LRStruct referencing this ANode.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||