Constructor and Description |
---|
NodeIterator(Node<E> head)
Create an iterator that starts iterating at the node
head |
public boolean hasNext()
hasNext
in interface Iterator<Node<E>>
Iterator.hasNext()
public Node<E> next()
next
in interface Iterator<Node<E>>
NoSuchElementException
- if no more nodes are availableIterator.next()
public void remove()
remove
in interface Iterator<Node<E>>
UnsupportedOperationException
- if this method is invokedIterator.remove()