gnu.prolog.vm
Class PrologCollectionIterator
java.lang.Object
gnu.prolog.vm.BacktrackInfo
gnu.prolog.vm.PrologCollectionIterator
public class PrologCollectionIterator
- extends BacktrackInfo
Generic collection iterator which can be used by PrologCode implementations.
- Author:
- Michiel Hendriks
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
iterator
protected Iterator<?> iterator
- The iterator it will go through
destTerm
protected Term destTerm
- The term to unify the value with
startUndoPosition
protected int startUndoPosition
- The start undo position
PrologCollectionIterator
public PrologCollectionIterator(Iterable<?> iterable,
Term destination,
int undoPosition)
- Parameters:
iterable
- The collection to iterate overdestination
- The destination termundoPosition
- the value of interpreter.getUndoPosition();
PrologCollectionIterator
public PrologCollectionIterator(Iterator<?> iterable,
Term destination,
int undoPosition)
- Parameters:
iterable
- The collection to iterate overdestination
- The destination termundoPosition
- the value of interpreter.getUndoPosition();
getUndoPosition
public int getUndoPosition()
- Returns:
- the startUndoPosition
nextSolution
public int nextSolution(Interpreter interpreter)
throws PrologException
- Get the next value
- Parameters:
interpreter
-
- Returns:
-
- Throws:
PrologException