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 (LRStruct, IAlgo, Object[])
Calls the visitor's non-empty case
 o getFirst (LRStruct)
 o getRest (LRStruct)
 o insertFront (LRStruct, Object)
Inserts a data object at the front of the LRStruct owner
 o removeFront (LRStruct)
 o setFirst (LRStruct, Object)
 o setRest (LRStruct, LRStruct)

Variables

 o _dat
private Object _dat
 o _tail
private LRStruct _tail

Constructors

 o NENode
public  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(LRStruct owner, Object first)
 o insertFront
LRStruct insertFront(LRStruct owner, Object dat)
Inserts a data object at the front of the LRStruct owner.

Parameters:
owner - the LRS referencing this NENode.
dat - the object to be inserted at the front.
 o removeFront
Object removeFront(LRStruct owner)
 o execute
Object execute(LRStruct owner, IAlgo algo, Object[] input)
Calls the visitor's non-empty case.