|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlrs.ANode
abstract class ANode
Represents the abstract list state. Has a concrete toString () method that uses anynomous inner classes to compute the String representation of the LRStruct owner.
Constructor Summary | |
---|---|
ANode()
|
Method Summary | |
---|---|
(package private) abstract Object |
execute(LRStruct owner,
IAlgo algo,
Object... inp)
Executes a visitor algorithm and returns the output. |
(package private) abstract Object |
getFirst(LRStruct owner)
Returns the first data object of the referencing LRStruct. |
(package private) abstract LRStruct |
getRest(LRStruct owner)
Returns the tail LRStruct of the referencing LRStruct. |
(package private) abstract LRStruct |
insertFront(LRStruct owner,
Object dat)
Inserts a data object at the front of the LRStruct owner. |
(package private) abstract Object |
removeFront(LRStruct owner)
Removes and returns the first data object for the referencing LRStruct. |
(package private) abstract LRStruct |
setFirst(LRStruct owner,
Object dat)
Sets a new first data object for the referencing LRStruct. |
(package private) abstract LRStruct |
setRest(LRStruct owner,
LRStruct tail)
Sets a new tail for the referencing LRStruct. |
(package private) String |
toString(LRStruct owner)
Uses anonymous visitor class to compute a String representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
ANode()
Method Detail |
---|
String toString(LRStruct owner)
abstract LRStruct getRest(LRStruct owner)
owner
- the LRStruct referencing this ANode.
NoSuchElementException
- if empty.abstract Object getFirst(LRStruct owner)
owner
- the LRStruct referencing this ANode.
NoSuchElementException
- if empty.abstract LRStruct setRest(LRStruct owner, LRStruct tail)
owner
- the LRS referencing this ANode.tail
- the new tail for the owner LRStruct.
LRStruct
owner
NoSuchElementException
- if empty.abstract LRStruct setFirst(LRStruct owner, Object dat)
owner
- the LRS referencing this ANode.dat
- the new data object for this ANode.
LRStruct
owner
NoSuchElementException
- if empty.abstract LRStruct insertFront(LRStruct owner, Object dat)
owner
- the LRS referencing this ANode.dat
- the object to be inserted at the front.
LRStruct
ownerabstract Object removeFront(LRStruct owner)
owner
- the LRS referencing this ANode.
abstract Object execute(LRStruct owner, IAlgo algo, Object... inp)
owner
- the LRS referencing this ANode.algo
- the visitor algorithm to be executed.inp
- the input needed by the algorithm.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |