Class FilteringIterator<T>
- java.lang.Object
-
- com.identityworksllc.iiq.common.iterators.FilteringIterator<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
Iterator<T>
public class FilteringIterator<T> extends Object implements Iterator<T>
Implements a Filtering Iterator that will return only items that match the Predicate.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FilteringIterator.DynamicValuePredicate<T>
A predicate that returns true if a DynamicValue or a Script returns a value that maps to Boolean true viaUtil.otob(Object)
.
-
Constructor Summary
Constructors Constructor Description FilteringIterator(Iterator<T> base, Predicate<T> filter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Returns true if the wrapped iterator contains an element that matches the PredicateT
next()
Returns the next object from the feedvoid
remove()
Throws an UnsupportedOperationException because this iterator looks ahead and cannot retroactively support deletion of records-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-