|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.computing.ai.planning.CompileTimeObject
org.jscience.computing.ai.planning.Term
public abstract class Term
Each term, both at compile time and at run time, is an instance of a class derived from this abstract class.
| Constructor Summary | |
|---|---|
Term()
|
|
| Method Summary | |
|---|---|
abstract Term |
bind(Term[] binding)
To apply a given binding to this term. |
abstract boolean |
equals(Term t)
Whether or not another term is equivalent to this term. |
abstract boolean |
findUnifier(Term t,
Term[] binding)
To find a unifier that binds this term to another given term. |
abstract boolean |
isGround()
Is this term ground (i.e., has no variables)? |
boolean |
isNil()
Is this a NIL term? |
static Term[] |
merge(Term[][] inp,
int howMany)
This function is used to merge an arbitrary number of bindings. |
static void |
merge(Term[] inp1,
Term[] inp2)
This function is used to merge two bindings. |
void |
print()
This function is used to print the value of this term. |
abstract java.lang.String |
toString()
This function is used to produce a printable String
showing the value of this term. |
| Methods inherited from class org.jscience.computing.ai.planning.CompileTimeObject |
|---|
toCode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Term()
| Method Detail |
|---|
public abstract Term bind(Term[] binding)
binding - an array of terms, indexed by the integers associated
with variable symbols.
public abstract boolean equals(Term t)
t - the term being compared to this term.
true if the two terms are equal, false
otherwise.
public abstract boolean findUnifier(Term t,
Term[] binding)
t - the term with which we are finding a unifier.binding - the unifier to be returned.
false if the two terms can not be unified,
true otherwise.public abstract boolean isGround()
true if this term is ground, false
otherwise.public boolean isNil()
NIL term?
true if this is a NIL term,
false otherwise.
public static void merge(Term[] inp1,
Term[] inp2)
inp1 - the first binding, also the result of merging.inp2 - the second binding.
public static Term[] merge(Term[][] inp,
int howMany)
inp - the bindings to be merged. This is a two dimensional array,
the first dimension indexes the different bindings, and the
second dimension indexes variables within each binding.howMany - how many of available bindings we want to merge. Bindings
indexed 0 to howMany-1 are merged.
public void print()
public abstract java.lang.String toString()
String
showing the value of this term.
toString in class java.lang.ObjectString that shows the value of this
term.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||