xxl.cursors
Class Filter

java.lang.Object
  |
  +--xxl.cursors.DecoratorCursor
        |
        +--xxl.cursors.Filter

public class Filter
extends DecoratorCursor

This class is used to wrap a Cursor, Iterator or PeekIterator. Only those elements for which a specified Function returns Boolean.TRUE are returned by next().


Field Summary
protected  Function function
          The Function used to evaluate an object.
 
Fields inherited from class xxl.cursors.DecoratorCursor
cursor
 
Constructor Summary
Filter(java.util.Iterator iterator, Function function)
           
 
Method Summary
 boolean hasNext()
          Returns true if the iteration has more elements.
 
Methods inherited from class xxl.cursors.DecoratorCursor
close, next, peek, remove, reset, supportsPeek, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

function

protected Function function
The Function used to evaluate an object.
Constructor Detail

Filter

public Filter(java.util.Iterator iterator,
              Function function)
Method Detail

hasNext

public boolean hasNext()
Returns true if the iteration has more elements.
Returns:
true if the iterator has more elements.
Overrides:
hasNext in class DecoratorCursor