Class SuppIterator<T>
- java.lang.Object
-
- org.apache.sling.query.impl.iterator.AbstractIterator<org.apache.sling.query.api.internal.Option<T>>
-
- org.apache.sling.query.impl.iterator.SuppIterator<T>
-
- Type Parameters:
T
- Option type
- All Implemented Interfaces:
Iterator<org.apache.sling.query.api.internal.Option<T>>
public class SuppIterator<T> extends AbstractIterator<org.apache.sling.query.api.internal.Option<T>>
This iterator returns all elements of the input list which are mapped to non-empty values by the input function. Name is inspired by the support of the function.
-
-
Constructor Summary
Constructors Constructor Description SuppIterator(List<org.apache.sling.query.api.internal.Option<T>> input, org.apache.sling.query.api.internal.IteratorToIteratorFunction<T> function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.sling.query.api.internal.Option<T>
getElement()
The idea behind this method is that index of each element in the input iterator is passed to the function.-
Methods inherited from class org.apache.sling.query.impl.iterator.AbstractIterator
hasNext, next, remove
-
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
-
-
-
-
Method Detail
-
getElement
protected org.apache.sling.query.api.internal.Option<T> getElement()
The idea behind this method is that index of each element in the input iterator is passed to the function. One or more Option<T> items for each index will be returned. If any Option<T> item in that index set is not empty then the corresponding element in the input will be returned.- Specified by:
getElement
in classAbstractIterator<org.apache.sling.query.api.internal.Option<T>>
-
-