|
|||||||||
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.
Field Summary | |
---|---|
static IAlgo |
ToStringAlgo
Uses anonymous visitor class to compute a String representation. |
Constructor Summary | |
---|---|
ANode()
|
Method Summary | |
---|---|
(package private) abstract java.lang.Object |
execute(LRStruct owner,
IAlgo algo,
java.lang.Object... inp)
Executes a visitor algorithm and returns the output. |
(package private) abstract java.lang.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(java.lang.Object dat,
LRStruct owner)
Inserts a data object at the front of the LRStruct owner. |
(package private) abstract java.lang.Object |
removeFront(LRStruct owner)
Removes and returns the first data object for the referencing LRStruct. |
(package private) abstract LRStruct |
setFirst(java.lang.Object dat,
LRStruct owner)
Sets a new first data object for the referencing LRStruct. |
(package private) abstract LRStruct |
setRest(LRStruct tail,
LRStruct owner)
Sets a new tail for the referencing LRStruct. |
(package private) java.lang.String |
toString(LRStruct owner)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final IAlgo ToStringAlgo
Constructor Detail |
---|
ANode()
Method Detail |
---|
java.lang.String toString(LRStruct owner)
abstract LRStruct getRest(LRStruct owner)
owner
- the LRStruct referencing this ANode.
abstract java.lang.Object getFirst(LRStruct owner)
owner
- the LRStruct referencing this ANode.
abstract LRStruct setRest(LRStruct tail, LRStruct owner)
tail
- the new tail for the owner LRStruct.owner
- the LRS referencing this ANode.
LRStruct
ownerabstract LRStruct setFirst(java.lang.Object dat, LRStruct owner)
first
- the new data object for this ANode.owner
- the LRS referencing this ANode.
LRStruct
ownerabstract LRStruct insertFront(java.lang.Object dat, LRStruct owner)
dat
- the object to be inserted at the front.owner
- the LRS referencing this ANode.
LRStruct
ownerabstract java.lang.Object removeFront(LRStruct owner)
owner
- the LRS referencing this ANode.
abstract java.lang.Object execute(LRStruct owner, IAlgo algo, java.lang.Object... inp)
owner
- 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 |