ListIterator

ListIterator - boolean hasNext(); // Adds an element before...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// The ListIterator interface allows access of a position in a linked list. // This interface contains a subset of the methods of the // standard java.util.ListIterator interface. The methods for // backward traversal are not included. public interface ListIterator { //Move Moves the iterator past the next element. Object next(); // Tests if there is an element after the iterator position.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: boolean hasNext(); // Adds an element before the iterator position // and moves the iterator past the inserted element. void add(Object element); // Removes the last traversed element. This method may // only be called after a call to the next() method. void remove(); // Sets the last traversed element to a different value. void set(Object element); }...
View Full Document

Ask a homework question - tutors are online