JavaView® v2.00.008

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.Serializable

Variables associate values with names. Copyright 1996 by Darius Bacon; see the file COPYING. 01Jun96: made `make' synchronized.

See Also:
Serialized Form

Field Summary
protected  java.lang.String name
          Unique name of variable.
protected  double val
          Numerical value of variable.
protected static java.util.Hashtable variables
          Hashtable of all allocated variables.
 
Constructor Summary
Variable(java.lang.String _name)
          Constructor with name of variable and initial value zero.
 
Method Summary
 double getValue()
          Get current value of variable.
static Variable make(java.lang.String _name)
          Return the unique variable named `_name', or create it if it does not exist yet.
 void set_value(double _val)
          Deprecated. use setValue(double) instead
 void setValue(double _val)
          Set current value of variable.
 java.lang.String toString()
          Create a string representation consisting of name and value.
 double value()
          Deprecated. use setValue(double) instead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

variables

protected static java.util.Hashtable variables
Hashtable of all allocated variables. Each variable is identified by its unique name.

name

protected java.lang.String name
Unique name of variable.

val

protected double val
Numerical value of variable.
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:
toString in class java.lang.Object

getValue

public double getValue()
Get current value of variable.

setValue

public void setValue(double _val)
Set current value of variable.

value

public double value()
Deprecated. use setValue(double) instead

Get current value of variable.

set_value

public void set_value(double _val)
Deprecated. use setValue(double) instead

Set current value of variable.

JavaView® v2.00.008

The software JavaView® is copyright protected. All Rights Reserved.