Class FindAll
java.lang.Object
org.projog.core.predicate.AbstractSingleResultPredicate
org.projog.core.predicate.builtin.compound.FindAll
- All Implemented Interfaces:
KnowledgeBaseConsumer, PredicateFactory, PreprocessablePredicateFactory
public final class FindAll
extends AbstractSingleResultPredicate
implements PreprocessablePredicateFactory
findall(X,P,L) - find all solutions that satisfy the goal.
findall(X,P,L) produces a list (L) of X for each possible solution of the goal
P. Succeeds with L unified to an empty list if P has no solutions.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static TermcreateListOfAllSolutions(Term template, Predicate predicate) protected booleanprivate static booleanevaluateFindAll(PredicateFactory pf, Term template, Term goal, Term output) private static booleanhasFoundAnotherSolution(Predicate predicate) preprocess(Term term) Methods inherited from class AbstractSingleResultPredicate
evaluate, evaluate, evaluate, evaluate, evaluate, getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, init, isRetryable, setKnowledgeBaseMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PredicateFactory
getPredicate, isAlwaysCutOnBacktrack, isRetryable
-
Constructor Details
-
FindAll
public FindAll()
-
-
Method Details
-
evaluate
- Overrides:
evaluatein classAbstractSingleResultPredicate
-
evaluateFindAll
-
createListOfAllSolutions
-
hasFoundAnotherSolution
-
preprocess
- Specified by:
preprocessin interfacePreprocessablePredicateFactory
-