|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectalice.tuprolog.Term
alice.tuprolog.Var
This class represents a variable term. Variables are identified by a name (which must starts with an upper case letter) or the anonymous ('_') name.
Term
,
Serialized FormField Summary |
Fields inherited from class alice.tuprolog.Term |
FALSE, TRUE |
Constructor Summary | |
Var()
Creates an anonymous variable This is equivalent to build a variable with name _ |
|
Var(java.lang.String n)
Creates a variable identified by a name. |
Method Summary | |
void |
free()
De-unify the variable |
static void |
free(java.util.List varsUnified)
De-unify the variables of list |
java.lang.String |
getName()
Gets the name of the variable |
java.lang.String |
getOriginalName()
Gets the name of the variable |
Term |
getTerm()
Gets the term which is referred by the variable. |
boolean |
isAnonymous()
Tests if this variable is ANY |
boolean |
isAtom()
is this term a prolog (alphanumeric) atom? |
boolean |
isAtomic()
is this term a constant prolog term? |
boolean |
isBound()
Tests if this variable is bound |
boolean |
isCompound()
is this term a prolog compound term? |
boolean |
isEmptyList()
is this term a null term? |
boolean |
isEqual(Term t)
Tests if this term is (logically) equal to another |
boolean |
isGreater(Term t)
Gets a copy of this variable |
boolean |
isGround()
is this term a ground term? |
boolean |
isList()
is this term a prolog list? |
boolean |
isNumber()
is this term a prolog numeric term? |
boolean |
isStruct()
is this term a struct? |
boolean |
isVar()
is this term a variable? |
java.lang.String |
toString()
Gets the string representation of this variable. |
java.lang.String |
toStringFlattened()
Gets the string representation of this variable, providing the string representation of the linked term in the case of bound variable |
Methods inherited from class alice.tuprolog.Term |
copyGoal, copyResult, createTerm, createTerm, equals, getIterator, iteratedGoalTerm, match, parse, parse, resolveTerm, unify |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Var(java.lang.String n) throws InvalidTermException
n
- is the name
InvalidTermException
- if n is not a valid namepublic Var()
Method Detail |
public void free()
free
in class Term
public static void free(java.util.List varsUnified)
public java.lang.String getName()
public java.lang.String getOriginalName()
public Term getTerm()
getTerm
in class Term
public boolean isNumber()
Term
isNumber
in class Term
public boolean isStruct()
Term
isStruct
in class Term
public boolean isVar()
Term
isVar
in class Term
public boolean isEmptyList()
Term
isEmptyList
in class Term
public boolean isAtomic()
Term
isAtomic
in class Term
public boolean isCompound()
Term
isCompound
in class Term
public boolean isAtom()
Term
isAtom
in class Term
public boolean isList()
Term
isList
in class Term
public boolean isGround()
Term
isGround
in class Term
public boolean isAnonymous()
public boolean isBound()
public boolean isGreater(Term t)
isGreater
in class Term
public boolean isEqual(Term t)
Term
isEqual
in class Term
public java.lang.String toString()
public java.lang.String toStringFlattened()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |