public class SerialEnumerator<T> extends Object implements Enumerator<T>
Constructor and Description |
---|
SerialEnumerator(String name,
Iterator<T> iterator,
Function<T,Enumerator<T>> constructor) |
Modifier and Type | Method and Description |
---|---|
int |
size() |
boolean |
visitSolution(int index,
BiConsumer<String,T> visitor)
Provides access to a solution, allowing it to be printed, put into a map, etc.
|
public int size()
size
in interface Enumerator<T>
public boolean visitSolution(int index, BiConsumer<String,T> visitor)
Enumerator
visitSolution
in interface Enumerator<T>
index
- the index of the solutionvisitor
- a consumer for each key/value pair in the solutionCopyright © 2013–2015 Apache Software Foundation. All rights reserved.