gov.nih.nci.cagrid.data.cql.cacore
Class ClassRestrictedIterator

java.lang.Object
  extended by gov.nih.nci.cagrid.data.cql.cacore.ClassRestrictedIterator
All Implemented Interfaces:
java.util.Iterator

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

ClassRestrictedIterator Iterator implementation that only returns objects from a collection which are instances of a given class.

Version:
$Id$
Author:
David W. Ervin

Constructor Summary
ClassRestrictedIterator(java.util.Collection col, java.lang.String validClassName)
           
 
Method Summary
 boolean hasNext()
          Returns true if the iteration has at least one more object of the type specified by validClassName
 java.lang.Object next()
          Returns the next object of the type specified by validClassName
 void remove()
          Remove is not implemented.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassRestrictedIterator

public ClassRestrictedIterator(java.util.Collection col,
                               java.lang.String validClassName)
Method Detail

hasNext

public boolean hasNext()
Returns true if the iteration has at least one more object of the type specified by validClassName

Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Returns the next object of the type specified by validClassName

Specified by:
next in interface java.util.Iterator
Throws:
java.util.NoSuchElementException - Thrown if the iteration contains no more elements

remove

public void remove()
Remove is not implemented.

Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.UnsupportedOperationException