public interface UserDefinedPredicateFactory extends PredicateFactory
A user defined predicate is a predicate that is constructed from Prolog syntax consulted at runtime.
Modifier and Type | Method and Description |
---|---|
void |
addFirst(ClauseModel clauseModel)
Adds a clause to the beginning of the predicate's list of clauses.
|
void |
addLast(ClauseModel clauseModel)
Adds a clause to the end of the predicate's list of clauses.
|
ClauseModel |
getClauseModel(int index)
Returns the clause at the specified position in this predicate's list of clauses.
|
Iterator<ClauseModel> |
getImplications()
Returns an iterator over the clauses in the predicate in proper sequence.
|
PredicateKey |
getPredicateKey()
Returns the key for the predicate this object represents
|
boolean |
isDynamic()
Returns
true is this predicate is dynamic. |
getPredicate, isAlwaysCutOnBacktrack, isRetryable
void addFirst(ClauseModel clauseModel)
clauseModel
- the clause to add to the beginning of the predicatevoid addLast(ClauseModel clauseModel)
clauseModel
- the clause to add to the end of the predicatePredicateKey getPredicateKey()
Iterator<ClauseModel> getImplications()
boolean isDynamic()
true
is this predicate is dynamic.
A "dynamic" predicate is a user defined predicate that can have clauses added or removed after is first defined.
true
is this predicate is dynamicClauseModel getClauseModel(int index)
index
- index of the clause to returnnull
if out of boundsCopyright © 2024. All rights reserved.