public class EOL<E> extends ListNode<E>
// Traversing a list (assuming the list is not empty)
node = list.first();
while (node != list.EOL)
node = node.next();
// Inserting (appending) at the end of the list
list.insert(list.EOL, something);
| Modifier and Type | Method and Description |
|---|---|
E |
getElement()
Always throws an TraLinkedListException.
|
ListNode<E> |
next()
Always throws a TraLinkedListException.
|
ListNode<E> |
previous()
Always throws an TraLinkedListException.
|
java.lang.String |
toString()
Returns the element's toString().
|
public E getElement()
getElement in class ListNode<E>