net.ontopia.utils
Class DeciderIterator<T>

java.lang.Object
  extended by net.ontopia.utils.DeciderIterator<T>
All Implemented Interfaces:
java.util.Iterator<T>

public class DeciderIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>

INTERNAL: An iterator that uses a decider to filter the elements of another iterator.


Field Summary
protected  DeciderIF<T> decider
           
protected  boolean done
           
protected  java.util.Iterator<T> iterator
           
protected  T next
           
 
Constructor Summary
DeciderIterator(DeciderIF<T> decider, java.util.Iterator<T> iterator)
           
 
Method Summary
protected  void findNext()
           
 boolean hasNext()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

decider

protected DeciderIF<T> decider

iterator

protected java.util.Iterator<T> iterator

done

protected boolean done

next

protected T next
Constructor Detail

DeciderIterator

public DeciderIterator(DeciderIF<T> decider,
                       java.util.Iterator<T> iterator)
Method Detail

findNext

protected void findNext()

hasNext

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

next

public T next()
Specified by:
next in interface java.util.Iterator<T>

remove

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


Copyright © 2000-2012 Ontopia.