Package com.github.tommyettinger.ds
Class EnumSet.EnumSetIterator
java.lang.Object
com.github.tommyettinger.ds.EnumSet.EnumSetIterator
- Direct Known Subclasses:
EnumOrderedSet.EnumOrderedSetIterator
- Enclosing class:
- EnumSet
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<Enum<?>>appendInto(Collection<Enum<?>> coll) Append the remaining items that this can iterate through into the given PrimitiveCollection.OfInt.booleanhasNext()Returnstrueif the iteration has more elements.Enum<?>next()voidremove()voidreset()ObjectList<Enum<?>>toList()Returns a newObjectListcontaining the remaining items.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
hasNext
public boolean hasNext
-
-
Constructor Details
-
EnumSetIterator
-
-
Method Details
-
reset
public void reset() -
hasNext
public boolean hasNext()Returnstrueif the iteration has more elements. (In other words, returnstrueifnext()would return an element rather than throwing an exception.) -
remove
public void remove() -
next
-
toList
Returns a newObjectListcontaining 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
-