public class ComplexVariable extends Variable implements ComplexEvaluator
ComplexVariable
is a Variable
of Type
ComplexType
. Although the Type
is clear
you have to give it by the constructor. So you can also specify your
own ComplexType
implementation.ComplexVariable
is used as a ComplexEvaluator
in an evaluator-tree. The method getComplexValue(Complex)
assigns
the constant's value to a Complex
object.ComplexConstant
,
RealVariable
Constructor and Description |
---|
ComplexVariable(String name,
de.jtem.mfc.field.Complex value,
Type type)
Creates a new
ComplexVariable . |
Modifier and Type | Method and Description |
---|---|
void |
getComplexValue(de.jtem.mfc.field.Complex c)
Assign
c the evaluated Complex value. |
equals, evaluate, getName, getReturnType, getValue, setValue, setValue, toString
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
evaluate, getReturnType
public ComplexVariable(String name, de.jtem.mfc.field.Complex value, Type type)
ComplexVariable
. Type type
can be
any generalization of ComplexType
or ComplexType
itself.name
- the name for the new Variable
.value
- the value for the new Variable
.type
- any generalization of ComplexType
or
ComplexType.TYPE
itself.public void getComplexValue(de.jtem.mfc.field.Complex c)
ComplexEvaluator
c
the evaluated Complex
value.getComplexValue
in interface ComplexEvaluator
c
- the Complex
value the evaluated value is to be
assigned to.ComplexEvaluator.getComplexValue(Complex)