import java.util.*; import java.io.*; /** This interface contains the methods of the ListIterator interface, except for the optional methods, and the nextIndex() and previousIndex() methods. Exceptions thrown are made explicit here. Note that this interface doesn't require that iterators be able to be initialized to the end of a collection (or even to the beginnning). */ public interface BidirectionalIterator { public boolean hasNext(); public boolean hasPrevious(); public Object next() throws NoSuchElementException; public Object previous() throws NoSuchElementException; };