agg.util
Class FilterIterator
java.lang.Object
agg.util.FilterIterator
public class FilterIterator
- extends java.lang.Object
Constructor Summary |
FilterIterator(java.util.Enumeration<?> base,
com.objectspace.jgl.UnaryFunction convert)
Construct myself to be an iterator that performs a conversion on any
element of the base iterator before it is passed along to the caller. |
FilterIterator(java.util.Enumeration<?> base,
com.objectspace.jgl.UnaryPredicate select)
Construct myself to be an iterator that skips some elements of the base
iterator according to a given predicate. |
FilterIterator(java.util.Enumeration<?> base,
com.objectspace.jgl.UnaryPredicate select,
com.objectspace.jgl.UnaryFunction convert)
Construct myself to be an iterator that combines filtering and conversion
on the elements of an underlying iterator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilterIterator
public FilterIterator(java.util.Enumeration<?> base,
com.objectspace.jgl.UnaryPredicate select,
com.objectspace.jgl.UnaryFunction convert)
- Construct myself to be an iterator that combines filtering and conversion
on the elements of an underlying iterator.
- Parameters:
base
- The underlying iterator.select
- A predicate that returns false for any object that the
FilterIterator should skip.convert
- A function object that specifies the conversion to be done on
each element of the iteration. This determines the type of the
objects returned by nextElement()
.
FilterIterator
public FilterIterator(java.util.Enumeration<?> base,
com.objectspace.jgl.UnaryFunction convert)
- Construct myself to be an iterator that performs a conversion on any
element of the base iterator before it is passed along to the caller.
Don't do any filtering.
- Parameters:
base
- The underlying iterator.convert
- A function object that specifies the conversion to be done on
each element of the iteration. This determines the type of the
objects returned by nextElement()
.
FilterIterator
public FilterIterator(java.util.Enumeration<?> base,
com.objectspace.jgl.UnaryPredicate select)
- Construct myself to be an iterator that skips some elements of the base
iterator according to a given predicate. Don't do any conversion on the
iteration elements.
- Parameters:
base
- The underlying iterator.select
- A predicate that returns false for any object that the
FilterIterator should skip.
hasMoreElements
public final boolean hasMoreElements()
nextElement
public final java.lang.Object nextElement()