Class lrs.NENode
- class NENode
- extends lrs.ANode
Represents the non-empty state of a LStruct.
- Author:
- Dung X. Nguyen Copyright 2001 - All rights reserved.
- _dat
- _tail
- NENode
(Object, LRStruct)
- Initializes this NENode to contain dat and a given tail list
- execute
(IAlgo, Object, LRStruct)
- Calls the visitor's non-empty case
- getFirst
(LRStruct)
- getRest
(LRStruct)
- insertFront
(Object, LRStruct)
- Inserts a data object at the front of the LRStruct owner
- removeFront
(LRStruct)
- setFirst
(Object, LRStruct)
- setRest
(LRStruct, LRStruct)
_dat
private Object _dat
_tail
private LRStruct _tail
NENode
NENode(Object dat, LRStruct tail)
- Initializes this NENode to contain dat and a given tail list.
- Parameters:
- dat - the data object to be stored in this NENode.
- tail - the LRStruct tail of this NENode.
getRest
LRStruct getRest(LRStruct owner)
getFirst
Object getFirst(LRStruct owner)
setRest
LRStruct setRest(LRStruct tail, LRStruct owner)
setFirst
LRStruct setFirst(Object first, LRStruct owner)
insertFront
LRStruct insertFront(Object dat, LRStruct owner)
- Inserts a data object at the front of the LRStruct owner.
- Parameters:
- dat - the object to be inserted at the front.
- owner - the LRS referencing this NENode.
removeFront
Object removeFront(LRStruct owner)
execute
Object execute(IAlgo algo, Object input, LRStruct owner)
- Calls the visitor's non-empty case.