Class UniqueIterator<T>

  • Type Parameters:
    T - Option type
    All Implemented Interfaces:
    Iterator<org.apache.sling.query.api.internal.Option<T>>

    public class UniqueIterator<T>
    extends AbstractIterator<org.apache.sling.query.api.internal.Option<T>>
    Provides an iteration of unique objects. During the iteration process this iterator maintains a HashSet of previously seen items that will be used as filter to prevent duplicates
    • Constructor Detail

      • UniqueIterator

        public UniqueIterator​(Iterator<org.apache.sling.query.api.internal.Option<T>> input)
    • Method Detail

      • getElement

        protected org.apache.sling.query.api.internal.Option<T> getElement()
        Specified by:
        getElement in class AbstractIterator<org.apache.sling.query.api.internal.Option<T>>