lrs
Class LazyNonNullState

java.lang.Object
  extended by lrs.ANode
      extended by lrs.LazyNonNullState

public class LazyNonNullState
extends ANode

Decorator for NonNullState, adding lazy evaluation capability.


Field Summary
(package private)  ALazyEval aLazyEval
           
(package private)  NENode neNode
           
 
Fields inherited from class lrs.ANode
ToStringAlgo
 
Constructor Summary
LazyNonNullState(java.lang.Object first, ALazyEval aLazyEval)
           
 
Method Summary
(package private)  void eval(LRStruct owner)
           
(package private)  java.lang.Object execute(LRStruct host, IAlgo visitor, java.lang.Object... param)
          Executes a visitor algorithm and returns the output.
(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

aLazyEval

ALazyEval aLazyEval

neNode

NENode neNode
Constructor Detail

LazyNonNullState

LazyNonNullState(java.lang.Object first,
                 ALazyEval aLazyEval)
Method Detail

getRest

LRStruct getRest(LRStruct owner)
Description copied from class: ANode
Returns the tail LRStruct of the referencing LRStruct.

Specified by:
getRest in class ANode
Parameters:
owner - the LRStruct referencing this ANode.
Returns:
the tail LRStruct of owner.

setRest

LRStruct setRest(LRStruct tail,
                 LRStruct owner)
Description copied from class: ANode
Sets a new tail for the referencing LRStruct.

Specified by:
setRest in class ANode
Parameters:
tail - the new tail for the owner LRStruct.
owner - the LRS referencing this ANode.
Returns:
LRStruct owner

setFirst

LRStruct setFirst(java.lang.Object first,
                  LRStruct owner)
Description copied from class: ANode
Sets a new first data object for the referencing LRStruct.

Specified by:
setFirst in class ANode
owner - the LRS referencing this ANode.
Returns:
LRStruct owner

insertFront

LRStruct insertFront(java.lang.Object dat,
                     LRStruct owner)
Description copied from class: ANode
Inserts a data object at the front of the LRStruct owner.

Specified by:
insertFront in class ANode
Parameters:
dat - the object to be inserted at the front.
owner - the LRS referencing this ANode.
Returns:
LRStruct owner

removeFront

java.lang.Object removeFront(LRStruct owner)
Description copied from class: ANode
Removes and returns the first data object for the referencing LRStruct.

Specified by:
removeFront in class ANode
Parameters:
owner - the LRS referencing this ANode.
Returns:
the front data of the LRStruct owner.

eval

void eval(LRStruct owner)

getFirst

java.lang.Object getFirst(LRStruct owner)
Description copied from class: ANode
Returns the first data object of the referencing LRStruct.

Specified by:
getFirst in class ANode
Parameters:
owner - the LRStruct referencing this ANode.
Returns:
the tail LRStruct of owner.

execute

java.lang.Object execute(LRStruct host,
                         IAlgo visitor,
                         java.lang.Object... param)
Description copied from class: ANode
Executes a visitor algorithm and returns the output.

Specified by:
execute in class ANode
Parameters:
host - the LRStruct referencing this ANode.
visitor - the visitor algorithm to be executed.
param - the inputs needed by the algorithm.