jv.thirdParty.expr
Class Variable
- java.lang.Object
-
- jv.thirdParty.expr.Variable
-
- All Implemented Interfaces:
- java.io.Serializable
public class Variable extends java.lang.Object implements java.io.SerializableVariables associate values with names. Copyright 1996 by Darius Bacon; see the file COPYING.- See Also:
- Serialized Form
- Version:
- 09.04.13, 2.10 revised (poe), (ur) Static hashtable replaced by PerThreadHashtable.
30.08.08, 2.00 revised (kp) Handling of complex functions added.
01.06.96, 1.00 created (Darius Bacon) Made `make' synchronized.
-
-
Constructor Summary
Constructors Constructor and Description Variable(java.lang.String name)Constructor with name of variable and initial value zero.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description PuComplexgetComplexValue()Get current complex value of variable.doublegetValue()Get current value of variable.booleanisComplex()Return whether double or complex.static Variablemake(java.lang.String name)Return the unique variable named `name', or create it if it does not exist yet.voidset_value(double val)Deprecated.use setValue(double) insteadvoidsetComplex(boolean bVal)Return whether double or complex.voidsetComplexValue(double u, double v)Set current complex value of variable.voidsetComplexValue(PuComplex zval)Set current complex value of variable.voidsetValue(double val)Set current value of variable.java.lang.StringtoString()Create a string representation consisting of name and value.doublevalue()Deprecated.use setValue(double) instead
-
-
-
Constructor Detail
-
Variable
public Variable(java.lang.String name)
Constructor with name of variable and initial value zero.
-
-
Method Detail
-
make
public static Variable make(java.lang.String name)
Return the unique variable named `name', or create it if it does not exist yet.
-
toString
public java.lang.String toString()
Create a string representation consisting of name and value.- Overrides:
toStringin classjava.lang.Object
-
getValue
public double getValue()
Get current value of variable.
-
setValue
public void setValue(double val)
Set current value of variable.
-
getComplexValue
public PuComplex getComplexValue()
Get current complex value of variable.
-
setComplexValue
public void setComplexValue(PuComplex zval)
Set current complex value of variable.
-
setComplexValue
public void setComplexValue(double u, double v)Set current complex value of variable.
-
isComplex
public boolean isComplex()
Return whether double or complex.
-
setComplex
public void setComplex(boolean bVal)
Return whether double or complex.
-
value
public double value()
Deprecated. use setValue(double) insteadGet current value of variable.
-
set_value
public void set_value(double val)
Deprecated. use setValue(double) insteadSet current value of variable.
-
-
"