|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlrs.ANode<T>
lrs.NENode<T>
class NENode<T>
Represents the non-empty state of a LStruct.
| Field Summary | |
|---|---|
private T |
_dat
|
private LRStruct<T> |
_tail
|
| Constructor Summary | |
|---|---|
NENode(T dat,
LRStruct<T> tail)
Initializes this NENode to contain dat and a given tail list. |
|
| Method Summary | ||
|---|---|---|
(package private)
|
execute(LRStruct<T> owner,
IAlgo<T,R,P> algo,
P... input)
Calls the visitor's non-empty case. |
|
(package private) T |
getFirst(LRStruct<T> owner)
Returns the first data object of the referencing LRStruct. |
|
(package private) LRStruct<T> |
getRest(LRStruct<T> owner)
Returns the tail LRStruct of the referencing LRStruct. |
|
(package private) LRStruct<T> |
insertFront(T dat,
LRStruct<T> owner)
Inserts a data object at the front of the LRStruct owner. |
|
(package private) T |
removeFront(LRStruct<T> owner)
Removes and returns the first data object for the referencing LRStruct. |
|
(package private) LRStruct<T> |
setFirst(T first,
LRStruct<T> owner)
Sets a new first data object for the referencing LRStruct. |
|
(package private) LRStruct<T> |
setRest(LRStruct<T> tail,
LRStruct<T> 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 T _dat
private LRStruct<T> _tail
| Constructor Detail |
|---|
NENode(T dat,
LRStruct<T> tail)
dat - the data object to be stored in this NENode.tail - the LRStruct tail of this NENode.| Method Detail |
|---|
LRStruct<T> getRest(LRStruct<T> owner)
ANode
getRest in class ANode<T>owner - the LRStruct referencing this ANode.
T getFirst(LRStruct<T> owner)
ANode
getFirst in class ANode<T>owner - the LRStruct referencing this ANode.
LRStruct<T> setRest(LRStruct<T> tail,
LRStruct<T> owner)
ANode
setRest in class ANode<T>tail - the new tail for the owner LRStruct.owner - the LRS referencing this ANode.
LRStruct owner
LRStruct<T> setFirst(T first,
LRStruct<T> owner)
ANode
setFirst in class ANode<T>owner - the LRS referencing this ANode.
LRStruct owner
LRStruct<T> insertFront(T dat,
LRStruct<T> owner)
insertFront in class ANode<T>dat - the object to be inserted at the front.owner - the LRS referencing this NENode.
LRStruct ownerT removeFront(LRStruct<T> owner)
ANode
removeFront in class ANode<T>owner - the LRS referencing this ANode.
<R,P> R execute(LRStruct<T> owner,
IAlgo<T,R,P> algo,
P... input)
execute in class ANode<T>owner - 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 | ||||||||