|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscranton.Linear1
scranton.Linear1Ind
Extends the Linear1 class with insert and remove methods that assume one level of indirection that is normally associated with one way linear recursive structures that apply 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 that support indirect referencing are indInsert and indRemove.
| Field Summary |
| Fields inherited from class scranton.Linear1 |
data, link |
| Constructor Summary | |
Linear1Ind()
Constructs a "null" Liner1Ind object. |
|
Linear1Ind(java.lang.Object data)
Constructs a non-empty Linear1Ind object with no recursive reference (a null reference). |
|
Linear1Ind(java.lang.Object data,
Linear1Ind link)
Constructs a non empty Linear1Ind object with a given recursive reference to another (possibly null) object. |
|
| Method Summary | |
void |
indInsert(Linear1Ind newObj)
Relinks the recursively referenced Linear1Ind structure by inserting a new Linear1Ind 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". |
Linear1Ind |
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 Linear1Ind object at one level of indirection from this. |
java.lang.Object |
indView()
References the object in the Linear1Ind object at one level of indirection from this. |
java.lang.String |
toString()
Returns a string composed of a tab delimited sequence of the data.toString()s of the objects in the recursive Linear1Ind structure starting at one level of indirection from this. |
| Methods inherited from class scranton.Linear1 |
factory, getData, getLink, setData, setLink |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Linear1Ind()
Object.Object()public Linear1Ind(java.lang.Object data)
data -
public Linear1Ind(java.lang.Object data,
Linear1Ind link)
data - Reference to the assocaited object.link - 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(Linear1Ind newObj)
newObj - The Linear1Ind object that is inserted (relinked) at one level of indirection.public Linear1Ind indRemove()
public java.lang.String toString()
toString in class Linear1
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||