Package org.projog.core.predicate.udp
Class ClauseModel
- java.lang.Object
-
- org.projog.core.predicate.udp.ClauseModel
-
public final class ClauseModel extends java.lang.ObjectRepresents a clause.A clause consists of a head and a body. Where a clause is not explicitly specified it defaults to having a body of
true.Called
ClauseModelto differentiate it fromClauseAction.
-
-
Field Summary
Fields Modifier and Type Field Description private Termantecedentprivate Termconsequentprivate Termoriginalprivate static TermTRUE
-
Constructor Summary
Constructors Modifier Constructor Description privateClauseModel(Term original, Term consequent, Term antecedent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClauseModelcopy()static ClauseModelcreateClauseModel(Term original)TermgetAntecedent()Returns the body of the clause.TermgetConsequent()Returns the head of the clause.TermgetOriginal()PredicateKeygetPredicateKey()booleanisFact()java.lang.StringtoString()
-
-
-
Method Detail
-
createClauseModel
public static ClauseModel createClauseModel(Term original)
-
getAntecedent
public Term getAntecedent()
Returns the body of the clause. i.e. the bit after the:-
-
getConsequent
public Term getConsequent()
Returns the head of the clause. i.e. the bit before the:-
-
getOriginal
public Term getOriginal()
-
getPredicateKey
public PredicateKey getPredicateKey()
-
copy
public ClauseModel copy()
-
isFact
public boolean isFact()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-