|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Literal
Represents a literal in the rule. A literal consists of a predicate, a pattern representing the variable names or contstants and a flag determining whether the literal is negated.
| Method Summary | |
|---|---|
java.lang.Object |
accept(KAON2Visitor visitor)
Accepts a visitor for this object. |
boolean |
containsVariable(Variable variable)
Returns true if this literal contains supplied variable. |
Term |
getArgument(int argumentIndex)
Returns the argument at given position. |
Constant |
getArgumentConstant(int argumentIndex)
Returns the constant of the given argument. |
Term[] |
getArguments()
Returns the array of argument terms. |
Variable |
getArgumentVariable(int argumentIndex)
Returns the variable at given position. |
int |
getArity()
Returns the arity of the literal. |
Predicate |
getPredicate()
Returns the predicate of this literal. |
boolean |
isArgumentBoundToConstant(int argumentIndex)
Reutrns true if given argument is bound to a constant. |
boolean |
isArgumentBoundToVariable(int argumentIndex)
Reutrns true if given argument is bound to a variable. |
boolean |
isPositive()
Returns true if this literal is positive (with respect to non-monotonic negation). |
void |
toString(java.lang.StringBuffer buffer,
Namespaces namespaces)
Writes this entity to the supplied sting buffer. |
| Method Detail |
|---|
boolean isPositive()
true if this literal is positive (with respect to non-monotonic negation).
true is this literal is positivePredicate getPredicate()
Term[] getArguments()
int getArity()
boolean isArgumentBoundToVariable(int argumentIndex)
true if given argument is bound to a variable.
argumentIndex - the index of the argument
true if the argument is bound to a variableboolean isArgumentBoundToConstant(int argumentIndex)
true if given argument is bound to a constant.
argumentIndex - the index of the argument
true if the argument is bound to a constantTerm getArgument(int argumentIndex)
argumentIndex - the index of the argument
Variable getArgumentVariable(int argumentIndex)
argumentIndex - the index of the argument
null if given position is not bound to a variable)Constant getArgumentConstant(int argumentIndex)
argumentIndex - the index of the argument
null if the argument is not bound to a constant)boolean containsVariable(Variable variable)
true if this literal contains supplied variable.
variable - the variable
true if this literal contains supplied variable
void toString(java.lang.StringBuffer buffer,
Namespaces namespaces)
buffer - the buffernamespaces - the namespaces objectjava.lang.Object accept(KAON2Visitor visitor)
visitor - the visitor for this object
null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||