| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlrs.ANode
lrs.EmptyNode
class EmptyNode
Represents the empty state of a mutable list LRStruct. Uses the Singleton pattern.
| Field Summary | |
|---|---|
| (package private) static EmptyNode | SingletonSingleton Pattern. | 
| Fields inherited from class lrs.ANode | 
|---|
| ToStringAlgo | 
| Constructor Summary | |
|---|---|
| private  | EmptyNode() | 
| Method Summary | |
|---|---|
| (package private)  java.lang.Object | execute(LRStruct owner,
               IAlgo algo,
               java.lang.Object... inp)Calls the IAlgovisitor's empty case. | 
| (package private)  java.lang.Object | getFirst(LRStruct owner)Throws java.util.NoSuchElementException. | 
| (package private)  LRStruct | getRest(LRStruct owner)Throws java.util.NoSuchElementException. | 
| (package private)  LRStruct | insertFront(java.lang.Object dat,
                       LRStruct owner)The owner becomes non-empty and has dat as its first element. | 
| (package private)  java.lang.Object | removeFront(LRStruct owner)Throws java.util.NoSuchElementException. | 
| (package private)  LRStruct | setFirst(java.lang.Object dat,
                 LRStruct owner)Throws java.util.NoSuchElementException. | 
| (package private)  LRStruct | setRest(LRStruct tail,
               LRStruct owner)Throws java.util.NoSuchElementException. | 
| 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 | 
|---|
static final EmptyNode Singleton
| Constructor Detail | 
|---|
private EmptyNode()
| Method Detail | 
|---|
LRStruct getRest(LRStruct owner)
getRest in class ANodeowner - the LRStruct referencing this ANode.
java.lang.Object getFirst(LRStruct owner)
getFirst in class ANodeowner - the LRStruct referencing this ANode.
LRStruct setRest(LRStruct tail,
                 LRStruct owner)
setRest in class ANodetail - the new tail for the owner LRStruct.owner - the LRS referencing this ANode.
LRStruct owner
LRStruct setFirst(java.lang.Object dat,
                  LRStruct owner)
setFirst in class ANodeowner - the LRS referencing this ANode.
LRStruct owner
LRStruct insertFront(java.lang.Object dat,
                     LRStruct owner)
insertFront in class ANodedat - the object to be inserted at the front.owner - the LRS referencing this ANode.
LRStruct ownerjava.lang.Object removeFront(LRStruct owner)
removeFront in class ANodeowner - the LRS referencing this ANode.
java.lang.Object execute(LRStruct owner,
                         IAlgo algo,
                         java.lang.Object... inp)
IAlgo visitor's empty case.
execute in class ANodeowner - the LRStruct referencing this ANode.algo - the visitor algorithm to be executed.inp - the inputs needed by the algorithm.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||