Interface IterablePosting

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int END_OF_LIST  
      static int EOL
      Values which denotes that the end of the posting list has been reached.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean endOfPostings()
      Status method to see if this posting list iterator has been finished.
      int next()
      Move this iterator to the next posting.
      int next​(int targetId)
      Move this iterator to the posting with specified id, or next posting after that if a posting with the specified id does not exist.
      • Methods inherited from interface java.io.Closeable

        close
    • Method Detail

      • next

        int next()
          throws java.io.IOException
        Move this iterator to the next posting.
        Returns:
        id of next posting, or EOL if end of posting list.
        Throws:
        java.io.IOException
      • next

        int next​(int targetId)
          throws java.io.IOException
        Move this iterator to the posting with specified id, or next posting after that if a posting with the specified id does not exist. This is usually implemented internally by next(), but more efficient implementations can override this behaviour.
        Parameters:
        targetId - id of the posting to find in this posting list.
        Returns:
        id of the posting found, or EOL if end of posting list is reached.
        Throws:
        java.io.IOException
      • endOfPostings

        boolean endOfPostings()
        Status method to see if this posting list iterator has been finished.
        Returns:
        true if next() or next(int) would return EOL or have returned EOL.