|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectalice.tuprolog.Term
Term class is the root abstract class for prolog data type
Struct,
Var,
Number,
Serialized Form| Field Summary | |
static Term |
FALSE
|
static Term |
TRUE
|
| Constructor Summary | |
Term()
|
|
| Method Summary | |
abstract Term |
copy()
gets a copy of this term. |
boolean |
equals(java.lang.Object t)
Tests for the equality of two object terms The comparison follows the same semantic of the isEQU method. |
static java.util.Iterator |
getIterator(java.lang.String text)
Gets an iterator providing a term stream from a source text |
Term |
getRenamedCopy()
Gets a renamed copy of this term All the variables in the term are unlinked and renamed |
abstract Term |
getTerm()
Gets the actual term referred by this Term. |
abstract boolean |
isAtom()
is this term a prolog (alphanumeric) atom? |
abstract boolean |
isAtomic()
is this term a constant prolog term? |
abstract boolean |
isCompound()
is this term a prolog compound term? |
abstract boolean |
isEqual(Term t)
Tests if this term is (logically) equal to another |
abstract boolean |
isGreater(Term t)
is term greater than term t? |
abstract boolean |
isGround()
is this term a ground term? |
abstract boolean |
isList()
is this term a prolog list? |
abstract boolean |
isNull()
is this term a null term? |
abstract boolean |
isNumber()
is this term a prolog numeric term? |
abstract boolean |
isStruct()
is this term a struct? |
abstract boolean |
isVar()
is this term a variable? |
boolean |
match(Term t)
Tests if this term is unifiable with an other term. |
static Term |
parse(java.lang.String st)
Static service to parse a Term from a string. |
static Term |
parse(java.lang.String st,
OperatorManager op)
Parse a Term from a string. |
void |
resolveVariables()
Resolves variables inside the term If the variables has been already resolved, no renaming is done. |
boolean |
unify(Term t)
Tries to unify two terms The unification is done outside a demonstration context. |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final Term TRUE
public static final Term FALSE
| Constructor Detail |
public Term()
| Method Detail |
public abstract boolean isNumber()
public abstract boolean isStruct()
public abstract boolean isVar()
public abstract boolean isNull()
public abstract boolean isAtomic()
public abstract boolean isCompound()
public abstract boolean isAtom()
public abstract boolean isList()
public abstract boolean isGround()
public boolean equals(java.lang.Object t)
public abstract boolean isGreater(Term t)
public abstract boolean isEqual(Term t)
public abstract Term copy()
public Term getRenamedCopy()
public abstract Term getTerm()
public void resolveVariables()
public boolean match(Term t)
t - the term to checked
public boolean unify(Term t)
t - the term to be unified with this one
public static Term parse(java.lang.String st)
throws InvalidTermException
st - the string representation of the term
InvalidTermException - if the string does not represent a valid term
public static Term parse(java.lang.String st,
OperatorManager op)
throws InvalidTermException
InvalidTermExceptionpublic static java.util.Iterator getIterator(java.lang.String text)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||