public class UnboundVariable extends PseudoToken implements LValue
Modifier and Type | Field and Description |
---|---|
java.lang.String |
name |
Constructor and Description |
---|
UnboundVariable(int position,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
double |
assign(double value) |
RValue |
bind(Expression expression,
boolean isLValue) |
LValue |
bindVariables(Expression expression,
boolean preferLValue) |
double |
getValue() |
char |
id()
Returns a character that helps identify the token, pseudo-token or invokable in question.
|
LValue |
optimize() |
java.lang.String |
toString() |
getPosition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPosition
public char id()
Identifiable
Tokens: i - IdentifierToken 0 - NumberToken o - OperatorToken \0 - NullToken CharacterTokens are returned literally PseudoTokens: p - UnaryOperator V - UnboundVariable Nodes: c - Constant v - Variable f - Function l - LValueFunction s - Sequence I - Conditional w - While F - For r - Return b - Break (includes continue) S - SimpleFor C - Switch
id
in interface Identifiable
id
in class PseudoToken
public java.lang.String toString()
toString
in class java.lang.Object
public double getValue() throws EvaluationException
getValue
in interface RValue
EvaluationException
public LValue optimize() throws EvaluationException
optimize
in interface LValue
optimize
in interface RValue
EvaluationException
public double assign(double value) throws EvaluationException
assign
in interface LValue
EvaluationException
public RValue bind(Expression expression, boolean isLValue) throws ParserException
ParserException
public LValue bindVariables(Expression expression, boolean preferLValue) throws ParserException
bindVariables
in interface LValue
bindVariables
in interface RValue
ParserException