Package com.github.tommyettinger.ds
Class CharBitSet.CharBitSetIterator
java.lang.Object
com.github.tommyettinger.ds.CharBitSet.CharBitSetIterator
- All Implemented Interfaces:
CharIterator,Iterator<Character>
- Enclosing class:
- CharBitSet
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAppend the remaining items that this can iterate through into the given PrimitiveCollection.OfChar.booleanhasNext()Returnstrueif the iteration has more elements.charnextChar()Returns the nextcharelement in the iteration.voidremove()voidreset()toList()Returns a newCharListcontaining the remaining items.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.tommyettinger.ds.support.util.CharIterator
forEachRemaining, nextMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
hasNext
public boolean hasNext
-
-
Constructor Details
-
CharBitSetIterator
-
-
Method Details
-
reset
public void reset() -
hasNext
public boolean hasNext()Returnstrueif the iteration has more elements. (In other words, returnstrueifCharIterator.next()would return an element rather than throwing an exception.) -
remove
public void remove() -
nextChar
public char nextChar()Description copied from interface:CharIteratorReturns the nextcharelement in the iteration.- Specified by:
nextCharin interfaceCharIterator- Returns:
- the next
charelement in the iteration
-
toList
Returns a newCharListcontaining 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.OfChar. Does not change the position of this iterator.- Parameters:
coll- any modifiable PrimitiveCollection.OfChar; may have items appended into it- Returns:
- the given primitive collection
-