|
GNU Prolog for Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object extended by gnu.prolog.vm.BacktrackInfo extended by gnu.prolog.vm.PrologCollectionIterator
public class PrologCollectionIterator
Generic collection iterator which can be used by PrologCode implementations.
Field Summary | |
---|---|
protected Term |
destTerm
The term to unify the value with |
protected Iterator<?> |
iterator
The iterator it will go through |
protected int |
startUndoPosition
The start undo position |
Fields inherited from class gnu.prolog.vm.BacktrackInfo |
---|
codePosition, undoPosition |
Constructor Summary | |
---|---|
PrologCollectionIterator(Iterable<?> iterable,
Term destination,
int undoPosition)
|
|
PrologCollectionIterator(Iterator<?> iterable,
Term destination,
int undoPosition)
|
Method Summary | |
---|---|
int |
getUndoPosition()
|
int |
nextSolution(Interpreter interpreter)
Get the next value |
Methods inherited from class gnu.prolog.vm.BacktrackInfo |
---|
undo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Iterator<?> iterator
protected Term destTerm
protected int startUndoPosition
Constructor Detail |
---|
public PrologCollectionIterator(Iterable<?> iterable, Term destination, int undoPosition)
iterable
- The collection to iterate overdestination
- The destination termundoPosition
- the value of interpreter.getUndoPosition();public PrologCollectionIterator(Iterator<?> iterable, Term destination, int undoPosition)
iterable
- The collection to iterate overdestination
- The destination termundoPosition
- the value of interpreter.getUndoPosition();Method Detail |
---|
public int getUndoPosition()
public int nextSolution(Interpreter interpreter) throws PrologException
interpreter
-
PrologException
|
GNU Prolog for Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |