Class HitIterator

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

    public class HitIterator
    extends java.lang.Object
    implements java.util.Iterator<Hit>
    An iterator for the list of hits in a result. This iterator supports the remove operation.
    Author:
    Steinar Knutsen
    • 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

      • HitIterator

        public HitIterator​(HitGroup hitGroup,
                           java.util.List<Hit> hits)
      • HitIterator

        public HitIterator​(Result result,
                           java.util.List<Hit> hits)
    • 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.IllegalStateException
        Specified by:
        remove in interface java.util.Iterator<Hit>
        Throws:
        java.lang.IllegalStateException