home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / jgl_1_1 / jgl_1_1.exe / src / ForwardIterator.java < prev    next >
Encoding:
Java Source  |  1996-09-10  |  1.0 KB  |  49 lines

  1. // Copyright(c) 1996 ObjectSpace, Inc.
  2. // Portions Copyright(c) 1995, 1996 Hewlett-Packard Company.
  3.  
  4. package jgl;
  5.  
  6. import java.util.Enumeration;
  7.  
  8. /**
  9.  * ForwardIterator is the interface of all iterators that can 
  10.  * read and/or write one item at a time in a forward direction. 
  11.  * <p>
  12.  * @version 1.1
  13.  * @author ObjectSpace, Inc.
  14.  */
  15.  
  16. public interface ForwardIterator extends InputIterator, OutputIterator
  17.   {
  18.   /**
  19.    * Advance by one.
  20.    */
  21.   public void advance();
  22.  
  23.   /**
  24.    * Advance by a specified amount.
  25.    * @param n The amount to advance.
  26.    */
  27.   public void advance( int n );
  28.  
  29.   /**
  30.    * Return the distance from myself to another iterator.
  31.    * I should be before the specified iterator.
  32.    * @param iterator The iterator to compare myself against.
  33.    */
  34.   public int distance( ForwardIterator iterator );
  35.  
  36.   /**
  37.    * Return a clone of myself.
  38.    */
  39.   public Object clone(); 
  40.  
  41.   /**
  42.    * Return my associated container.
  43.    */
  44.   public Container getContainer();
  45.   }
  46.   
  47.  
  48.  
  49.