|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object is.lill.acre.logic.Term
public class Term
A logic term within an ACRE conversation
Field Summary | |
---|---|
static int |
CONSTANT
|
static int |
FUNCTION
|
static int |
PREDICATE
|
static int |
VARIABLE
|
Constructor Summary | |
---|---|
Term()
|
Method Summary | |
---|---|
void |
addArgument(Term arg)
|
Term |
applyBindings(Bindings b)
Apply a set of bindings to this term, replacing any variable with its binding in b , if present. |
Term |
clone()
Generate a clone of this term |
boolean |
equals(Term t)
Determine whether this term is equal to another. |
java.util.List<Term> |
getArguments()
Get the arguments of this term |
Bindings |
getBindings(Term t)
Compare this term to another and generate a set of bindings between any variables present within this term and any values they match in the given term. |
java.lang.String |
getFunctor()
Get the functor of this term |
boolean |
isAnonymousVariable()
|
boolean |
isConstant()
Check if this term is a constant (i.e. |
boolean |
isFunction()
Check if this term is a function |
boolean |
isMutable()
Check if this term is mutable |
boolean |
isPredicate()
Check if this term is a predicate |
boolean |
isVariable()
Check if this represents a variable term |
boolean |
matches(Term t)
Check if this term matches another term. |
void |
setFunctor(java.lang.String functor)
|
void |
setMutable(boolean mutable)
|
void |
setType(int type)
|
java.lang.String |
toDebuggingString()
To print debugging information on Terms |
java.lang.String |
toString()
toString calls dotted around the code. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int VARIABLE
public static int CONSTANT
public static int PREDICATE
public static int FUNCTION
Constructor Detail |
---|
public Term()
Method Detail |
---|
public void addArgument(Term arg)
public boolean isVariable()
true
if this term is a variable, false
otherwisepublic boolean isAnonymousVariable()
public boolean isMutable()
true
if the term is mutable, false
otherwisepublic void setMutable(boolean mutable)
public void setFunctor(java.lang.String functor)
public void setType(int type)
public boolean isConstant()
true
if the term is constant, false
otherwisepublic boolean isPredicate()
true
if the term is a predicate, false
otherwisepublic boolean isFunction()
true
if the term is a function, false
otherwisepublic boolean matches(Term t)
t
- A second term to check for a match against
true
if the terms match, false
otherwise.public java.lang.String getFunctor()
public Term applyBindings(Bindings b)
b
, if present.
b
- A set of bindings to apply
public Bindings getBindings(Term t)
t
- Another term to match against
t
.public Term clone()
clone
in class java.lang.Object
public boolean equals(Term t)
t
- Another term to compare with
true
if the terms are equal, false
otherwisepublic java.util.List<Term> getArguments()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toDebuggingString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |