|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.joensuu.cs.tra.ListNode<E>
public class ListNode<E>
ListNodes are the building blocks
of the TraLinkedLists.
They are basically just wrappers for the elements in addition
to in a sense marking the position in a
TraLinkedList.
A special case of ListNodes is the
fi.joensuu.cs.tra.EOL which marks the
end of the list and cannot be operated on with the exception of
using it as the positional parameter when
inserting a node at the end of the list.
The next()
and
previous()
methods
can also be called from
TraLinkedList.
The methods
setElement()
and
getElement()
should be
rather self-explanatory.
Method Summary | |
---|---|
E |
getElement()
Returns this ListNode's element. |
ListNode<E> |
next()
Returns this ListNode's next node. |
ListNode<E> |
previous()
Returns this ListNode's previous node. |
String |
toString()
Returns the element's toString(). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public E getElement()
public ListNode<E> next()
TraLinkedListException
- if this node is
TraLinkedList.EOL
.public ListNode<E> previous()
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |