Class Is
- java.lang.Object
-
- org.projog.core.predicate.AbstractSingleResultPredicate
-
- org.projog.core.predicate.builtin.compare.Is
-
- All Implemented Interfaces:
KnowledgeBaseConsumer,PredicateFactory,PreprocessablePredicateFactory
public final class Is extends AbstractSingleResultPredicate implements PreprocessablePredicateFactory
X is Y- evaluate arithmetic expression.Firstly structure
Yis evaluated as an arithmetic expression to give a number. Secondly an attempt is made to match the number toX. The goal succeeds or fails based on the match.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classIs.PreprocessedIsprivate static classIs.Unify
-
Constructor Summary
Constructors Constructor Description Is()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanevaluate(Term arg1, Term arg2)PredicateFactorypreprocess(Term arg)-
Methods inherited from class org.projog.core.predicate.AbstractSingleResultPredicate
evaluate, evaluate, evaluate, evaluate, evaluate, getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, init, isRetryable, setKnowledgeBase
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.projog.core.predicate.PredicateFactory
getPredicate, isAlwaysCutOnBacktrack, isRetryable
-
-
-
-
Method Detail
-
evaluate
protected boolean evaluate(Term arg1, Term arg2)
- Overrides:
evaluatein classAbstractSingleResultPredicate
-
preprocess
public PredicateFactory preprocess(Term arg)
- Specified by:
preprocessin interfacePreprocessablePredicateFactory
-
-