public final class InsertRecord extends AbstractSingleResultPredicate
recorda(X,Y,Z)
/ recordz(X,Y,Z)
- associates a term with a key.
recorda(X,Y,Z)
associates Y
with X
. The unique reference for this association
will be unified with Z
. Y
is added to the start of the list of terms already
associated with X
.
recordz(X,Y,Z)
associates Y
with X
. The unique reference for this association
will be unified with Z
. Y
is added to the end of the list of terms already
associated with X
.
Modifier and Type | Method and Description |
---|---|
protected boolean |
evaluate(Term key,
Term value) |
protected boolean |
evaluate(Term key,
Term value,
Term reference) |
void |
init()
This method is called by
AbstractSingleResultPredicate.setKnowledgeBase(KnowledgeBase) . |
static InsertRecord |
recordA() |
static InsertRecord |
recordZ() |
evaluate, evaluate, evaluate, evaluate, getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, isRetryable, setKnowledgeBase
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isAlwaysCutOnBacktrack
public static InsertRecord recordA()
public static InsertRecord recordZ()
public void init()
AbstractSingleResultPredicate
AbstractSingleResultPredicate.setKnowledgeBase(KnowledgeBase)
.
Can be overridden by subclasses to perform initialisation before any calls to AbstractSingleResultPredicate.evaluate(Term...)
are made.
As AbstractSingleResultPredicate.setKnowledgeBase(KnowledgeBase)
will have already been called before this method is invoked,
overridden versions will be able to access the KnowledgeBase
using AbstractSingleResultPredicate.getKnowledgeBase()
.
init
in class AbstractSingleResultPredicate
protected boolean evaluate(Term key, Term value)
evaluate
in class AbstractSingleResultPredicate
protected boolean evaluate(Term key, Term value, Term reference)
evaluate
in class AbstractSingleResultPredicate
Copyright © 2024. All rights reserved.