|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscranton.Linear1
scranton.Linear2
Extends the Linear1 class to a class to construct two way linked linearly recursive collection objects.
| Field Summary | |
protected Linear2 |
previous
Field (possibly null) referencing the recursive Linear2 object that precedes this object. |
| Fields inherited from class scranton.Linear1 |
data, link |
| Constructor Summary | |
Linear2()
Constructs a "null" Linear2 object. |
|
Linear2(Linear2 newPrev,
java.lang.Object data,
Linear2 newNext)
Linear2 constructor creates a non empty object with a given recursive reference to another (possibly null) object. |
|
Linear2(java.lang.Object data)
Constructs a non-empty object with (null reference) no preceding or following recursive references. |
|
| Method Summary | |
Linear1 |
factory()
Returns a null Linear2() object |
Linear2 |
getNext()
Returns reference to the Linear2 recursive object that follows this Linear2 object. |
Linear2 |
getPrevious()
Returns reference to the Linear2 recursive object that precedes this Linear2 object. |
void |
setNext(Linear2 newNext)
Replace the current contents of the link field with a reference to the newLink Linear2 object. |
void |
setPrevious(Linear2 newPrev)
Replace the current contents of the previous field with a reference to the newLink Linear2 object. |
| 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 |
| Field Detail |
protected Linear2 previous
| Constructor Detail |
public Linear2()
Object.Object()public Linear2(java.lang.Object data)
data - The item to be referenced by this Linear1 object.
public Linear2(Linear2 newPrev,
java.lang.Object data,
Linear2 newNext)
newPrev - Reference to the Linear2 recursive object (possibly null) that precedes this object.data - Reference to the object associated with this Linear2 object.newNext - Recursive reference to the next (possibly null) Linear2 object.| Method Detail |
public Linear2 getPrevious()
public Linear2 getNext()
public void setPrevious(Linear2 newPrev)
newPrev - The recursive Linear2 object (possibly null) referenced before this Linear2 object.public void setNext(Linear2 newNext)
newNext - The recursive Linear2 object (possibly null) referenced after this Linear2 object.public Linear1 factory()
factory in class Linear1
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||