View Javadoc

1   /*
2    * Created on 25-Jan-2005
3    */
4   package ca.uhn.cache.util;
5   
6   import java.util.Iterator;
7   
8   /***
9    * An extension of IMutableIterator with a convenience method for merging multiple 
10   * iterators. 
11   *  
12   * @author <a href="mailto:bryan.tripp@uhn.on.ca">Bryan Tripp</a>
13   * @version $Revision: 1.1 $ updated on $Date: 2005/01/26 00:25:50 $ by $Author: bryan_tripp $
14   */
15  public interface IMutableMergeableIterator extends IMutableIterator {
16      
17      /***
18       * Incorporates the contents of the given iterator into this one.  No guarantees 
19       * are made as to the resulting ordering of elements.  
20       * 
21       * If the given iterator is an IMutableIterator, and close() is called some time in the future, 
22       * then close() will be called on the merged IMutableIterator as well.    
23       *     
24       * @param theIterator another Iterator to combine with this one
25       */
26      public void merge(Iterator theIterator);
27  
28  }