home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-09-10 | 884 b | 35 lines |
- // Copyright(c) 1996 ObjectSpace, Inc.
- // Portions Copyright(c) 1995, 1996 Hewlett-Packard Company.
-
- package jgl;
-
- /**
- * RandomAccessIterator is the interface of all iterators that can
- * read and/or write one item at a time in a forwards or backwards
- * direction. In addition, two random access iterators may be efficiently
- * compared for their relative location to each other.
- * <p>
- * @version 1.1
- * @author ObjectSpace, Inc.
- */
-
- public interface RandomAccessIterator extends BidirectionalIterator
- {
- /**
- * Return the index of my current position.
- */
- public int index();
-
- /**
- * Return true if I'm before a specified iterator.
- * @param iterator The iterator to compare myself against.
- */
- public boolean less( RandomAccessIterator iterator );
-
- /**
- * Return a clone of myself.
- */
- public Object clone();
- }
-
-