public interface SolutionIterator
SolutionIterator iter = solver.solutionIterator(); while(iter.hasNext()) { Solution solution = iter.next(); ... } The method next() should not be called without checking that hasNext() returned true.
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns true if the iteration has more solutions.
|
Solution |
next()
Returns the next solution
|
boolean hasNext()
Solution next()
java.lang.RuntimeException
- "Cannot use SolutionIterator.next() before checking that hasNext() returned true"