Class OffsetBitSet.OffsetBitSetIterator

java.lang.Object
com.github.tommyettinger.ds.OffsetBitSet.OffsetBitSetIterator
All Implemented Interfaces:
IntIterator, Iterator<Integer>
Enclosing class:
OffsetBitSet

public static class OffsetBitSet.OffsetBitSetIterator extends Object implements IntIterator
  • Field Details

    • hasNext

      public boolean hasNext
  • Constructor Details

    • OffsetBitSetIterator

      public OffsetBitSetIterator(OffsetBitSet set)
  • Method Details

    • reset

      public void reset()
    • hasNext

      public boolean hasNext()
      Returns true if the iteration has more elements. (In other words, returns true if IntIterator.next() would return an element rather than throwing an exception.)
      Specified by:
      hasNext in interface Iterator<Integer>
      Returns:
      true if the iteration has more elements
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<Integer>
    • nextInt

      public int nextInt()
      Description copied from interface: IntIterator
      Returns the next int element in the iteration.
      Specified by:
      nextInt in interface IntIterator
      Returns:
      the next int element in the iteration
    • toList

      public IntList toList()
      Returns a new IntList containing the remaining items. Does not change the position of this iterator.
    • appendInto

      Append the remaining items that this can iterate through into the given PrimitiveCollection.OfInt. Does not change the position of this iterator.
      Parameters:
      coll - any modifiable PrimitiveCollection.OfInt; may have items appended into it
      Returns:
      the given primitive collection