Class Once
java.lang.Object
org.projog.core.predicate.AbstractSingleResultPredicate
org.projog.core.predicate.builtin.compound.Once
- All Implemented Interfaces:
KnowledgeBaseConsumer, PredicateFactory, PreprocessablePredicateFactory
public final class Once
extends AbstractSingleResultPredicate
implements PreprocessablePredicateFactory
once(X) - calls the goal represented by a term.
The once(X) goal succeeds if an attempt to satisfy the goal represented by the term X
succeeds. No attempt is made to retry the goal during backtracking - it is only evaluated once.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
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
-
Once
public Once()
-
-
Method Details
-
evaluate
- Overrides:
evaluatein classAbstractSingleResultPredicate
-
preprocess
- Specified by:
preprocessin interfacePreprocessablePredicateFactory
-