jess
Class FilteringIterator

java.lang.Object
  extended by jess.FilteringIterator
All Implemented Interfaces:
java.util.Iterator

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

A wrapper around an Iterator that applies a jess.Filter to each element, rejecting the ones that don't pass the filter.

(C) 2013 Sandia Corporation


Constructor Summary
FilteringIterator(java.util.Iterator iterator, Filter filter)
           
 
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

FilteringIterator

public FilteringIterator(java.util.Iterator iterator,
                         Filter filter)
Method Detail

remove

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

hasNext

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

next

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

2013 Sandia Corporation