|
|||||||||||
| 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 Form| Field 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 | |
Term |
copy()
Gets a copy of this variable |
java.lang.String |
getName()
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 |
isEqual(Term t)
Tests if this term is (logically) equal to another |
boolean |
isGreater(Term t)
is term greater than term t? |
boolean |
isGround()
is this term a ground term? |
boolean |
isList()
is this term a prolog list? |
boolean |
isNull()
is this term a null term? |
boolean |
isNumber()
is this term a prolog numeric term? |
boolean |
isResolved()
Tests if this variable is resolved |
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 |
equals, getIterator, getRenamedCopy, match, parse, parse, resolveVariables, unify |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Var(java.lang.String n)
throws InvalidVarNameException
n - is the name
InvalidVarNameException - if n is not a valid namepublic Var()
| Method Detail |
public java.lang.String getName()
public Term getTerm()
getTerm in class Termpublic boolean isNumber()
isNumber in class Termpublic boolean isStruct()
isStruct in class Termpublic boolean isVar()
isVar in class Termpublic boolean isNull()
Term
isNull in class Termpublic boolean isAtomic()
Term
isAtomic in class Termpublic boolean isCompound()
Term
isCompound in class Termpublic boolean isAtom()
Term
isAtom in class Termpublic boolean isList()
Term
isList in class Termpublic boolean isGround()
Term
isGround in class Termpublic boolean isAnonymous()
public boolean isBound()
public boolean isResolved()
public Term copy()
copy in class Termpublic boolean isGreater(Term t)
Term
isGreater in class Termpublic boolean isEqual(Term t)
Term
isEqual in class Termpublic 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 | ||||||||||