com.generationjava.collections
Class CopiedIterator

java.lang.Object
  |
  +--com.generationjava.collections.CopiedIterator
All Implemented Interfaces:
java.util.Iterator

public class CopiedIterator
extends java.lang.Object
implements java.util.Iterator

Sucks a copy of an iterator into it. It consumes the iterator when it copys it. This is useful when you want to make the walking of the real iterator as quick as possible.


Constructor Summary
CopiedIterator(java.util.Iterator itr)
           
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopiedIterator

public CopiedIterator(java.util.Iterator itr)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

remove

public void remove()
Specified by:
remove in interface java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator


Copyright © 2000-2003 OSJava. All Rights Reserved.