|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectstructure.SinglyLinkedListElement<ELTTYPE>
public class SinglyLinkedListElement<ELTTYPE>
A class supporting a singly linked list element. Each element contains a value and maintains a single reference to the next node in the list.
| Constructor Summary | |
|---|---|
SinglyLinkedListElement(ELTTYPE v)
Constructs a singly linked list element not associated with any list. |
|
SinglyLinkedListElement(ELTTYPE v,
SinglyLinkedListElement<ELTTYPE> next)
Construct a singly linked list element. |
|
| Method Summary | |
|---|---|
SinglyLinkedListElement<ELTTYPE> |
next()
|
void |
setNext(SinglyLinkedListElement<ELTTYPE> next)
Update the next element. |
void |
setValue(ELTTYPE value)
Set the value associated with this element. |
java.lang.String |
toString()
Construct a string representation of element. |
ELTTYPE |
value()
Fetch the value associated with this element. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SinglyLinkedListElement(ELTTYPE v,
SinglyLinkedListElement<ELTTYPE> next)
v - The value to be referenced by this element.next - A reference to the next value in the list.public SinglyLinkedListElement(ELTTYPE v)
v - The value to be inserted into the singly linked list element.| Method Detail |
|---|
public SinglyLinkedListElement<ELTTYPE> next()
public void setNext(SinglyLinkedListElement<ELTTYPE> next)
next - The new value of the next element reference.public ELTTYPE value()
public void setValue(ELTTYPE value)
value - The new value to be associated with this element.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||