com.generationjava.collections
Class CopiedIterator

java.lang.Object
  extended bycom.generationjava.collections.CopiedIterator
All Implemented Interfaces:
Iterator

public class CopiedIterator
extends Object
implements 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(Iterator itr)
           
 
Method Summary
 boolean hasNext()
           
 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(Iterator itr)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator


Copyright © 2000-2005 OSJava. All Rights Reserved.