Class Limit
java.lang.Object
org.projog.core.predicate.AbstractPredicateFactory
org.projog.core.predicate.builtin.compound.Limit
- All Implemented Interfaces:
KnowledgeBaseConsumer, PredicateFactory, PreprocessablePredicateFactory
limit(N, X) - calls the goal represented by a term a maximum number of times.
Evaluates the goal represented by X for a maximum of N attempts.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classprivate static final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static PredicategetLimitPredicate(PredicateFactory pf, Term maxAttempts, Term goal) getPredicate(Term maxAttempts, Term goal) preprocess(Term term) Methods inherited from class AbstractPredicateFactory
getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicate, getPredicate, getPredicate, 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
-
Limit
public Limit()
-
-
Method Details
-
getPredicate
- Overrides:
getPredicatein classAbstractPredicateFactory
-
getLimitPredicate
-
preprocess
- Specified by:
preprocessin interfacePreprocessablePredicateFactory
-