public class ComplexConstant extends Constant implements ComplexEvaluator
ComplexConstant
is a Constant
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.ComplexConstant
is used as a ComplexEvaluator
in an evaluator-tree. The method getComplexValue(Complex)
assigns
the constant's value to a Complex
object.ComplexVariable
,
RealConstant
Constructor and Description |
---|
ComplexConstant(String n,
de.jtem.mfc.field.Complex val,
Type t)
Creates a new
ComplexConstant . |
Modifier and Type | Method and Description |
---|---|
void |
getComplexValue(de.jtem.mfc.field.Complex c)
Assign
c the evaluated Complex value. |
evaluate, getConstant, getReturnType, isConstant, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
evaluate, getReturnType
public ComplexConstant(String n, de.jtem.mfc.field.Complex val, Type t)
ComplexConstant
. Type t
can be
any generalization of ComplexType
or ComplexType
itself.n
- the name for the new Constant
.val
- the value for the new Constant
.t
- 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)