stsci.criteria
Class CritIter

java.lang.Object
  |
  +--stsci.criteria.CritIter
All Implemented Interfaces:
java.util.Iterator
Direct Known Subclasses:
COMPASSIter

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

Iterator throug an Iterator applying a Criterea to eachi object before deciding if to return it.


Field Summary
protected  Criteria crit
           
protected  java.util.Iterator iter
           
protected  java.lang.Object theNext
           
 
Constructor Summary
CritIter(java.util.Iterator iter, Criteria crit)
           
 
Method Summary
 void getNext()
           
 boolean hasNext()
          Should be straight forward but actually not that simple.
 java.lang.Object next()
          Return theNext and getthe next object of possible.
 void remove()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theNext

protected java.lang.Object theNext

iter

protected java.util.Iterator iter

crit

protected Criteria crit
Constructor Detail

CritIter

public CritIter(java.util.Iterator iter,
                Criteria crit)
Method Detail

hasNext

public boolean hasNext()
Should be straight forward but actually not that simple. Dont no if there is a next until we get it !
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Return theNext and getthe next object of possible. Next is always running one object ahead so it can respond to hasNext().
Specified by:
next in interface java.util.Iterator

remove

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

getNext

public void getNext()