Class PermutationsIterator
- java.lang.Object
-
- com.github.curiousoddman.rgxgen.iterators.PermutationsIterator
-
- All Implemented Interfaces:
StringIterator,Iterator<String>
public class PermutationsIterator extends Object implements StringIterator
-
-
Constructor Summary
Constructors Constructor Description PermutationsIterator(List<Supplier<StringIterator>> iteratorsSuppliers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcurrent()Return same value as last call tonext().booleanhasNext()Stringnext()voidreset()Reset the iterator to the initial position.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
PermutationsIterator
public PermutationsIterator(List<Supplier<StringIterator>> iteratorsSuppliers)
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:StringIteratorReset the iterator to the initial position. After reset it will start iterating from the first value.Can be used to restart iterator that returns
falsewhenhasNext()is called.- Specified by:
resetin interfaceStringIterator
-
current
public String current()
Description copied from interface:StringIteratorReturn same value as last call tonext(). Behavior is not defined if method is called beforenext()- Specified by:
currentin interfaceStringIterator- Returns:
- Value returned by last call to
next().
-
-