Class IfThen
java.lang.Object
org.projog.core.predicate.AbstractPredicateFactory
org.projog.core.predicate.builtin.compound.IfThen
- All Implemented Interfaces:
KnowledgeBaseConsumer, PredicateFactory, PreprocessablePredicateFactory
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).
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PredicategetPredicate(Term conditionTerm, Term thenTerm) 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
-
IfThen
public IfThen()
-
-
Method Details
-
getPredicate
- Overrides:
getPredicatein classAbstractPredicateFactory
-
preprocess
- Specified by:
preprocessin interfacePreprocessablePredicateFactory
-