|
|||||||||
| 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 |
_dat
|
private LRStruct |
_tail
|
| Fields inherited from class lrs.ANode |
|---|
ToStringAlgo |
| 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(LRStruct owner,
IAlgo algo,
java.lang.Object... input)
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 tail 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 tail 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 tail 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(LRStruct owner,
IAlgo algo,
java.lang.Object... input)
execute in class ANodeowner - the LRStruct referencing this ANode.algo - the visitor algorithm to be executed.input - the inputs needed by the algorithm.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||