Class Functor
java.lang.Object
org.projog.core.predicate.AbstractSingleResultPredicate
org.projog.core.predicate.builtin.construct.Functor
- All Implemented Interfaces:
KnowledgeBaseConsumer, PredicateFactory
functor(T,F,N)
Predicate functor(T,F,N) means "T is a structure with name (functor) F and
N number of arguments".
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractSingleResultPredicate
evaluate, evaluate, evaluate, evaluate, evaluate, getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, 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
isAlwaysCutOnBacktrack
-
Constructor Details
-
Functor
public Functor()
-
-
Method Details
-
evaluate
- Overrides:
evaluatein classAbstractSingleResultPredicate
-
createTerm
Creates a term using the given functor (name) and arity (number of arguments).- Parameters:
functor- an atom representing the name of the term to createarity- a numeric representing the number of arguments of the term to create- Returns:
- if arity is 0 then an atom will be returned, else a structure will be created.
-