Class EnumSet.EnumSetIterator

java.lang.Object
com.github.tommyettinger.ds.EnumSet.EnumSetIterator
All Implemented Interfaces:
Iterator<Enum<?>>
Direct Known Subclasses:
EnumOrderedSet.EnumOrderedSetIterator
Enclosing class:
EnumSet

public static class EnumSet.EnumSetIterator extends Object implements Iterator<Enum<?>>
  • Field Details

    • hasNext

      public boolean hasNext
  • Constructor Details

    • EnumSetIterator

      public EnumSetIterator(EnumSet 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 next() would return an element rather than throwing an exception.)
      Specified by:
      hasNext in interface Iterator<Enum<?>>
      Returns:
      true if the iteration has more elements
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<Enum<?>>
    • next

      public Enum<?> next()
      Specified by:
      next in interface Iterator<Enum<?>>
    • toList

      public ObjectList<Enum<?>> toList()
      Returns a new ObjectList containing the remaining items. Does not change the position of this iterator.
    • appendInto

      public Collection<Enum<?>> appendInto(Collection<Enum<?>> coll)
      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