Class DeepHitIterator

  • All Implemented Interfaces:
    java.util.Iterator<Hit>

    public class DeepHitIterator
    extends java.lang.Object
    implements java.util.Iterator<Hit>
    An iterator for the forest of hits in a result.
    Author:
    havardpe
    • Constructor Summary

      Constructors 
      Constructor Description
      DeepHitIterator​(java.util.Iterator<Hit> it, boolean ordered)
      Create a deep hit iterator based on the given hit iterator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      Hit next()  
      void 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
    • Constructor Detail

      • DeepHitIterator

        public DeepHitIterator​(java.util.Iterator<Hit> it,
                               boolean ordered)
        Create a deep hit iterator based on the given hit iterator.
        Parameters:
        it - The hits iterator to traverse.
        ordered - Whether or not the hits should be ordered.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<Hit>
      • next

        public Hit next()
                 throws java.util.NoSuchElementException
        Specified by:
        next in interface java.util.Iterator<Hit>
        Throws:
        java.util.NoSuchElementException
      • remove

        public void remove()
                    throws java.lang.UnsupportedOperationException,
                           java.lang.IllegalStateException
        Specified by:
        remove in interface java.util.Iterator<Hit>
        Throws:
        java.lang.UnsupportedOperationException
        java.lang.IllegalStateException