|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscranton.Linear1
scranton.Linear2
scranton.Linear2Ind
Extends the Linear2 class with insert and remove methods that hide a level of indirection normally associated with one way linear structures that require a null object at the beginning of the structure. A "null object" is an object that is frequently used to represent a empty structure. The extended methods to support indirect referencing are insertNext and removeNext.
| Field Summary |
| Fields inherited from class scranton.Linear2 |
previous |
| Fields inherited from class scranton.Linear1 |
data, link |
| Constructor Summary | |
Linear2Ind()
Constructs a "null" Liner2Ind object. |
|
Linear2Ind(Linear2 newPrev,
java.lang.Object data,
Linear2 newNext)
Constructs a non empty Linear2Ind object with a given recursive reference to another (possibly null) object. |
|
Linear2Ind(java.lang.Object data)
Constructs a non-empty Linear2Ind object with no recursive reference (a null reference). |
|
| Method Summary | |
void |
indInsert(Linear2Ind Obj)
Relinks the recursively referenced Linear1Ind structure by inserting a new Linear2Ind object, newObj, at one level of indirection from this, addressing the additonal level of indirection normally associated with a linear structure that begins with a "null object". |
java.lang.Object |
indRemove()
Removes an object at one level of indirection from "this", addressing the removal of an object from a linear structure that begins with a "null object". |
void |
indReplace(java.lang.Object o)
Replaces the contents of the Linear2Ind object at one level of indirection from this. |
java.lang.Object |
indView()
References the object in the Linear2Ind object at one level of indirection from this. |
| Methods inherited from class scranton.Linear2 |
factory, getNext, getPrevious, setNext, setPrevious |
| Methods inherited from class scranton.Linear1 |
getData, getLink, setData, setLink, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Linear2Ind()
Object.Object()public Linear2Ind(java.lang.Object data)
data -
public Linear2Ind(Linear2 newPrev,
java.lang.Object data,
Linear2 newNext)
newPrev - Recursive reference to the previous Linear1Ind object.data - Reference to the assocaited object.newNext - Recursive reference to the next Linear1Ind object.| Method Detail |
public java.lang.Object indView()
public void indReplace(java.lang.Object o)
o - The new object assocaited with the indirect reference.public void indInsert(Linear2Ind Obj)
Obj - The Linear2Ind object that is inserted (relinked) at one level of indirection.public java.lang.Object indRemove()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||