public final class IfThen extends AbstractPredicateFactory implements PreprocessablePredicateFactory
X->Y - if X succeeds then Y is evaluated.
Note: The behaviour of this predicate changes when it is specified as the first argument of a structure of the
form ;/2, i.e. the "disjunction" predicate. When a ->/2 predicate is the first
argument of a ;/2 predicate then the resulting behaviour is a "if/then/else" statement of the
form ((if->then);else).
Disjunction| Constructor and Description |
|---|
IfThen() |
| Modifier and Type | Method and Description |
|---|---|
protected Predicate |
getPredicate(Term conditionTerm,
Term thenTerm) |
PredicateFactory |
preprocess(Term term) |
getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicate, getPredicate, getPredicate, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, init, isRetryable, setKnowledgeBaseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPredicate, isAlwaysCutOnBacktrack, isRetryableprotected Predicate getPredicate(Term conditionTerm, Term thenTerm)
getPredicate in class AbstractPredicateFactorypublic PredicateFactory preprocess(Term term)
preprocess in interface PreprocessablePredicateFactoryCopyright © 2024. All rights reserved.