Class CharBitSetFixedSize.CharBitSetFixedSizeIterator
java.lang.Object
com.github.tommyettinger.ds.CharBitSetFixedSize.CharBitSetFixedSizeIterator
- All Implemented Interfaces:
CharIterator, Iterator<Character>
- Enclosing class:
CharBitSetFixedSize
public static class CharBitSetFixedSize.CharBitSetFixedSizeIterator
extends Object
implements CharIterator
-
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()char[]toArray()Returns a newchar[]containing the remaining items.toList()Returns a newCharListcontaining the remaining items.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CharIterator
forEachRemaining, nextMethods inherited from interface Iterator
forEachRemaining
-
Field Details
-
hasNext
public boolean hasNext
-
-
Constructor Details
-
CharBitSetFixedSizeIterator
-
-
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
-
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
-
toArray
public char[] toArray()Returns a newchar[]containing the remaining items. Does not change the position of this iterator. -
toList
-
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
-