Class FilteringNodeIterator

  • All Implemented Interfaces:
    java.util.Iterator, javax.jcr.NodeIterator, javax.jcr.RangeIterator

    public class FilteringNodeIterator
    extends java.lang.Object
    implements javax.jcr.NodeIterator
    A wrapper around a NodeIterator filtering out nodes from the base iterator that don't match the specified filter. Due to the nature of the filter mechanism the size if the iterator may shrink upon iteration.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getPosition()  
      long getSize()  
      boolean hasNext()  
      java.lang.Object next()  
      javax.jcr.Node nextNode()  
      void remove()  
      void skip​(long skipNum)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • FilteringNodeIterator

        public FilteringNodeIterator​(javax.jcr.NodeIterator base,
                                     Predicate filter)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator
        See Also:
        Iterator.hasNext()
      • next

        public java.lang.Object next()
        Specified by:
        next in interface java.util.Iterator
        See Also:
        Iterator.next()
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator
        See Also:
        Iterator.remove()
      • nextNode

        public javax.jcr.Node nextNode()
        Specified by:
        nextNode in interface javax.jcr.NodeIterator
        See Also:
        NodeIterator.nextNode()
      • skip

        public void skip​(long skipNum)
        Specified by:
        skip in interface javax.jcr.RangeIterator
        See Also:
        RangeIterator.skip(long)
      • getSize

        public long getSize()
        Specified by:
        getSize in interface javax.jcr.RangeIterator
        See Also:
        RangeIterator.getSize()
      • getPosition

        public long getPosition()
        Specified by:
        getPosition in interface javax.jcr.RangeIterator
        See Also:
        RangeIterator.getPosition()