BoundVariable class

A bound variable is an anonymous variable, e.g. a variable without name, which is bound to an expression.

Inheritance

Constructors

BoundVariable(Expression expr)
Creates an anonymous variable which is bound to the given expression.

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
The name of this variable.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value ↔ dynamic
getter/setter pairinherited

Methods

derive(String toVar) Expression
Derives this expression with respect to the given variable.
override
evaluate(EvaluationType type, ContextModel context) → dynamic
Evaluates this expression according to given type and context.
override
getConstantValue() → dynamic
Returns the constant value of this literal. Throws StateError if literal is not constant, check before usage with isConstant().
override
isConstant() bool
Returns true, if this literal is a constant.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
simplify() Expression
Returns a simplified version of this expression. Subclasses should overwrite this method, if applicable.
override
toString() String
Put bound variable in curly brackets to make them distinguishable.
override

Operators

operator %(Expression exp) Expression
Modulo operator. Creates a Modulo expression.
inherited
operator *(Expression exp) Expression
Multiply operator. Creates a Times expression.
inherited
operator +(Expression exp) Expression
Add operator. Creates a Plus expression.
inherited
operator -(Expression exp) Expression
Subtract operator. Creates a Minus expression.
inherited
operator /(Expression exp) Expression
Divide operator. Creates a Divide expression.
inherited
operator ==(Object other) bool
The equality operator.
inherited
operator ^(Expression exp) Expression
Power operator. Creates a Power expression.
inherited
operator unary-() Expression
Unary minus operator. Creates a UnaryMinus expression.
inherited