public class Var extends Term
Term
,
Serialized FormConstructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(TermVisitor tv)
Visitor pattern
|
Term |
copyAndRetainFreeVar(java.util.AbstractMap<Var,Var> vMap,
int idExecCtx) |
void |
free()
De-unify the variable
|
static void |
free(java.util.List<Var> varsUnified)
De-unify the variables of list
|
Term |
getLink()
Gets the term which is direct referred by the variable.
|
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 |
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 |
isNumber()
is this term a prolog numeric term?
|
boolean |
isStruct()
is this term a struct?
|
boolean |
isVar()
is this term a variable?
|
void |
setName(java.lang.String s) |
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
|
copyGoal, copyResult, createTerm, createTerm, equals, fromJSON, getIterator, isEqual, isEqualObject, iteratedGoalTerm, match, match, parse, parse, resolveTerm, toJSON, unify
public Var(java.lang.String n)
n
- is the nameInvalidTermException
- if n is not a valid Prolog variable namepublic Var()
public Term copyAndRetainFreeVar(java.util.AbstractMap<Var,Var> vMap, int idExecCtx)
copyAndRetainFreeVar
in class Term
public static void free(java.util.List<Var> varsUnified)
public java.lang.String getName()
public java.lang.String getOriginalName()
public Term getTerm()
public Term getLink()
public boolean isNumber()
Term
public boolean isStruct()
Term
public boolean isVar()
Term
public boolean isEmptyList()
Term
isEmptyList
in class Term
public boolean isAtomic()
Term
public boolean isCompound()
Term
isCompound
in class Term
public boolean isAtom()
Term
public boolean isList()
Term
public boolean isGround()
Term
public boolean isAnonymous()
public boolean isBound()
public boolean isGreater(Term t)
Term
public void setName(java.lang.String s)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringFlattened()
public void accept(TermVisitor tv)
Term