Class FilteringIterator<T>
- java.lang.Object
-
- com.oracle.coherence.concurrent.executor.util.FilteringIterator<T>
-
- Type Parameters:
T- the type being iterated
- All Implemented Interfaces:
Iterator<T>
public class FilteringIterator<T> extends Object implements Iterator<T>
AFilteringIteratorthat filters elements in anotherIteratorbased on a specifiedRemote.Predicate.- Since:
- 21.12
- Author:
- bo
-
-
Field Summary
Fields Modifier and Type Field Description protected Iterator<T>f_iteratorThe underlyingIteratorof elements to be filtered.protected com.tangosol.util.function.Remote.Predicate<? super T>f_predicateTheRemote.Predicatethat must be satisfied for an element to be returned by theIterator.protected Tm_elementThe next element to return from theIteratorthat matched theRemote.Predicate.
-
Constructor Summary
Constructors Constructor Description FilteringIterator(Iterator<T> iterator, com.tangosol.util.function.Remote.Predicate<? super T> predicate)Constructs aFilteringIterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Tnext()voidremove()-
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
-
-
-
-
Field Detail
-
f_iterator
protected final Iterator<T> f_iterator
The underlyingIteratorof elements to be filtered.
-
f_predicate
protected final com.tangosol.util.function.Remote.Predicate<? super T> f_predicate
TheRemote.Predicatethat must be satisfied for an element to be returned by theIterator.
-
-
Constructor Detail
-
FilteringIterator
public FilteringIterator(Iterator<T> iterator, com.tangosol.util.function.Remote.Predicate<? super T> predicate)
Constructs aFilteringIterator.- Parameters:
iterator- theIteratorof elements to filterpredicate- theRemote.Predicatethat must be satisfied
-
-