public final class UnknownPredicate extends Object implements PreprocessablePredicateFactory
KnowledgeBase has no definition of.
Always fails to evaluate successfully.
| Constructor and Description |
|---|
UnknownPredicate(KnowledgeBase kb,
PredicateKey key) |
| Modifier and Type | Method and Description |
|---|---|
Predicate |
getPredicate(Term[] args)
Returns a
Predicate to be used in the evaluation of a goal. |
boolean |
isRetryable()
Should instances of this implementation be re-evaluated when backtracking?
|
PredicateFactory |
preprocess(Term arg) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisAlwaysCutOnBacktrackpublic UnknownPredicate(KnowledgeBase kb, PredicateKey key)
public Predicate getPredicate(Term[] args)
PredicateFactoryPredicate to be used in the evaluation of a goal.getPredicate in interface PredicateFactoryargs - the arguments to use in the evaluation of the goalPredicate.evaluate()public PredicateFactory preprocess(Term arg)
preprocess in interface PreprocessablePredicateFactorypublic boolean isRetryable()
PredicateFactory
Some goals (e.g. X is 1) are only meant to be evaluated once (the statement is either true or false) while
others (e.g. repeat(3)) are meant to be evaluated multiple times. For instances of Predicate that
are designed to possibly have Predicate.evaluate() called on them multiple times for the same individual
query this method should return true. For instances of Predicate that are designed to only be
evaluated once per individual query this method should return false.
isRetryable in interface PredicateFactorytrue if an attempt should be made to re-evaluate instances of implementing classes when
backtracking, false otherwiseCopyright © 2024. All rights reserved.