|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscranton.Linear1
Fundamental class for constructing linear recursive objects.
| Field Summary | |
protected java.lang.Object |
data
Field (possibly null) referencing the object associated to this Linear1 object. |
protected Linear1 |
link
Field (possibly null) referencing the Linear1 object that follows this one in the recursive structure. |
| Constructor Summary | |
Linear1()
Constructs a "null" Linear1 object. |
|
Linear1(java.lang.Object data)
Constructs an non-empty Linear1 object with no recursive reference (a null reference). |
|
Linear1(java.lang.Object data,
Linear1 link)
Constructs a non empty Linear1 object with a recursive reference to a next (possibly null) object. |
|
| Method Summary | |
Linear1 |
factory()
Returns a null Linear1() object |
java.lang.Object |
getData()
Returns reference to the object referenced by the data field. |
Linear1 |
getLink()
Returns reference to the next Linear1 recursive object. |
void |
setData(java.lang.Object newData)
Replace the current data field reference with a reference to newData. |
void |
setLink(Linear1 newLink)
Replace the current contents of the link field with a reference to the newLink Linear1 object. |
java.lang.String |
toString()
Returns a string composed of a tab delimited sequence of the data.toString()s of the objects in the recursive Linear1 structure. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.Object data
protected Linear1 link
| Constructor Detail |
public Linear1()
Object.Object()public Linear1(java.lang.Object data)
data - The item to be referenced by this Linear1 object
public Linear1(java.lang.Object data,
Linear1 link)
data - Reference to the object that corresponds to this Linear1 object.link - Recursive reference to the next Linear1 object.| Method Detail |
public java.lang.Object getData()
public void setData(java.lang.Object newData)
newData - New object to be associated with this Linear1 object.public Linear1 getLink()
public void setLink(Linear1 newLink)
newLink - The recursive Linear1 object (possibly null) referenced after this Linear1 object.public java.lang.String toString()
public Linear1 factory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||