Class AlterSpyPoint
- java.lang.Object
-
- org.projog.core.predicate.AbstractSingleResultPredicate
-
- org.projog.core.predicate.builtin.debug.AlterSpyPoint
-
- All Implemented Interfaces:
KnowledgeBaseConsumer,PredicateFactory
public final class AlterSpyPoint extends AbstractSingleResultPredicate
spy(X)/nospy(X)- add or remove a spy point for a predicate.spy(X)- add a spy point for a predicate. By adding a spy point for the predicate name instantiated toXthe programmer will be informed how it is used in the resolution of a goal.nospy(X)- removes a spy point for a predicate. By removing a spy point for the predicate name instantiated toXthe programmer will no longer be informed how it is used in the resolution of a goal.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanvalueToSetSpyPointTo
-
Constructor Summary
Constructors Modifier Constructor Description privateAlterSpyPoint(boolean valueToSetSpyPointTo)ThevalueToSetSpyPointToparameter specifies whether spy points matched by theevaluate(Term)method should be enabled or disabled.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanevaluate(Term t)static AlterSpyPointnoSpy()private voidsetSpyPoint(PredicateKey key)private voidsetSpyPoints(java.util.List<PredicateKey> keys)static AlterSpyPointspy()-
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
isAlwaysCutOnBacktrack
-
-
-
-
Constructor Detail
-
AlterSpyPoint
private AlterSpyPoint(boolean valueToSetSpyPointTo)
ThevalueToSetSpyPointToparameter specifies whether spy points matched by theevaluate(Term)method should be enabled or disabled.- Parameters:
valueToSetSpyPointTo-trueto enable spy points,falseto disable spy points
-
-
Method Detail
-
spy
public static AlterSpyPoint spy()
-
noSpy
public static AlterSpyPoint noSpy()
-
evaluate
protected boolean evaluate(Term t)
- Overrides:
evaluatein classAbstractSingleResultPredicate
-
setSpyPoints
private void setSpyPoints(java.util.List<PredicateKey> keys)
-
setSpyPoint
private void setSpyPoint(PredicateKey key)
-
-