public final class Var extends AbstractVar
Modifier and Type | Field and Description |
---|---|
static Var |
ANONYMOUS_VAR |
protected String |
name |
Modifier and Type | Method and Description |
---|---|
static List<Var> |
asVariables(Iterable<String> variablesNames) |
String |
getName()
returns the lexical id of this Variable
|
int |
hashCode() |
boolean |
isAnonymous() |
static boolean |
isUnderscoreVariableName(String variableName) |
static boolean |
isValidVariableName(String variableName)
Wether a logic variable has a valid id
|
Term |
preCompile(Environment env) |
Term |
prepareForFrame(Environment env) |
Term |
prepareForQuery(Environment env) |
boolean |
termEquals(Term term)
Test if this object is equivalent to the term representation of the object sent as parameter
This is not testing for equality in a mathematical sense, for example:
'new Variable("_").equals(new Variable("_"))'
is false, since both the receiver and the arguments are anonymous variables, not the same variable.
|
void |
unify(Term term) |
accept, basicRead, equals, getVariableNames, hasFunctor, isGround, toEscapedString, toString, toString
arg, arity, asList, basicIsList, canUnify, changeVariablesNames, compile, compile, compile, compile, compileAndUnify, compileAndUnifyVars, getArgs, getNamedVariables, getNamedVariablesNames, getNonUnderscoreVariableNames, getNonUnderscoreVariables, getVariableNames, getVariables, hasFunctor, hasFunctor, hasFunctor, hasFunctor, hasVariable, isHilog, isList, listLength, prepareForFrame, prepareForQuery, read, read, replaceVariables, resolveBindings, termEquals, termExpansion, toEscapedString, toEscapedString, unifyAndBind, varBindings
public Var()
public Var(String name)
public static boolean isUnderscoreVariableName(String variableName)
public static boolean isValidVariableName(String variableName)
variableName
- the id of the variablepublic boolean isAnonymous()
isAnonymous
in class AbstractVar
public final String getName()
getName
in class AbstractVar
public boolean termEquals(Term term)
Term
termEquals
in class Term
public Term preCompile(Environment env)
preCompile
in class Term
public Term prepareForQuery(Environment env)
prepareForQuery
in class Term
public Term prepareForFrame(Environment env)
prepareForFrame
in class Term
Copyright © 2014. All rights reserved.