Interface ISetIterator

  • All Superinterfaces:

    public interface ISetIterator
    extends Iterator<Integer>
    Object to iterate over an ISet values using // more readable but includes autoboxing for(int value:set){ ... } // more verbose but without autoboxing ISetIterator iter = set.primitiveIterator(); while(iter.hasNext()){ int k = iter.nextInt(); ... }
    Jean-Guillaume Fages
    • Method Detail

      • reset

        void reset()
        Reset iteration (to avoid creating a new ISetIterator for every iteration)
      • notifyRemoving

        default void notifyRemoving​(int item)
        Inform the iterator that value item has been removed (may require to update iterator structure)
        item - removed value
      • nextInt

        int nextInt()
        Returns the next int in the iteration. Beware : avoids autoboxing
        the next int in the iteration
        NoSuchElementException - if the iteration has no more elements