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.

Variable Index

 o _dat
 o _tail

Constructor Index

 o NENode (Object, LRStruct)
Initializes this NENode to contain dat and a given tail list

Method Index

 o execute (IAlgo, Object, LRStruct)
Calls the visitor's non-empty case
 o getFirst (LRStruct)
 o getRest (LRStruct)
 o insertFront (Object, LRStruct)
Inserts a data object at the front of the LRStruct owner
 o removeFront (LRStruct)
 o setFirst (Object, LRStruct)
 o setRest (LRStruct, LRStruct)

Variables

 o _dat
private Object _dat
 o _tail
private LRStruct _tail

Constructors

 o 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.

Methods

 o getRest
LRStruct getRest(LRStruct owner)
 o getFirst
Object getFirst(LRStruct owner)
 o setRest
LRStruct setRest(LRStruct tail, LRStruct owner)
 o setFirst
LRStruct setFirst(Object first, LRStruct owner)
 o 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.
 o removeFront
Object removeFront(LRStruct owner)
 o execute
Object execute(IAlgo algo, Object input, LRStruct owner)
Calls the visitor's non-empty case.