Interface IntSet.IntIterator

All Superinterfaces:
Cloneable, org.roaringbitmap.IntIterator
All Known Implementing Classes:
BitIterator, EmptyIntIterator
Enclosing interface:
IntSet

public static interface IntSet.IntIterator extends org.roaringbitmap.IntIterator
An Iterator-like interface that allows to "skip" some elements of the set
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone the iterator
    boolean
     
    int
     
    void
    skipAllBefore(int element)
    Skips all the elements before the specified element, so that next() gives the given element or, if it does not exist, the element immediately after according to the sorting provided by this set.
  • Method Details

    • hasNext

      boolean hasNext()
      Specified by:
      hasNext in interface org.roaringbitmap.IntIterator
      Returns:
      true if the iterator has more elements.
    • next

      int next()
      Specified by:
      next in interface org.roaringbitmap.IntIterator
      Returns:
      the next element in the iteration.
      Throws:
      NoSuchElementException - iteration has no more elements.
    • skipAllBefore

      void skipAllBefore(int element)
      Skips all the elements before the specified element, so that next() gives the given element or, if it does not exist, the element immediately after according to the sorting provided by this set.

      If element is less than the next element, it does nothing

      Parameters:
      element - first element to not skip
    • clone

      Clone the iterator
      Specified by:
      clone in interface org.roaringbitmap.IntIterator
      Returns:
      a clone of the IntIterator