org.opensourcephysics.ejs.control.value
Class ExpressionValue

java.lang.Object
  extended by org.opensourcephysics.ejs.control.value.Value
      extended by org.opensourcephysics.ejs.control.value.ExpressionValue

public class ExpressionValue
extends Value

A ExpressionValue is a Value object that holds an expression is parsed into a double.

See Also:
Value

Constructor Summary
ExpressionValue(java.lang.String _expression, GroupControl _group)
          Constructor ExpressionValue
 
Method Summary
 Value cloneValue()
          Clones one value into another
 void copyValue(Value _source)
          Copies one value into another
 boolean getBoolean()
          Returns the value of the variable as a boolean
 double getDouble()
          Returns the value of the variable as a double
 int getInteger()
          Returns the value of the variable as an int
 java.lang.Object getObject()
          Returns the value of the variable as an Object.
 java.lang.String getString()
          Returns the value of the variable as a String
 void setExpression(java.lang.String _expression)
           
 
Methods inherited from class org.opensourcephysics.ejs.control.value.Value
parseConstant, parseConstantOrArray, removeScapes, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExpressionValue

public ExpressionValue(java.lang.String _expression,
                       GroupControl _group)
Constructor ExpressionValue

Parameters:
_expression -
_group -
Method Detail

getBoolean

public boolean getBoolean()
Description copied from class: Value
Returns the value of the variable as a boolean

Specified by:
getBoolean in class Value

getInteger

public int getInteger()
Description copied from class: Value
Returns the value of the variable as an int

Specified by:
getInteger in class Value

getDouble

public double getDouble()
Description copied from class: Value
Returns the value of the variable as a double

Specified by:
getDouble in class Value

getString

public java.lang.String getString()
Description copied from class: Value
Returns the value of the variable as a String

Specified by:
getString in class Value

getObject

public java.lang.Object getObject()
Description copied from class: Value
Returns the value of the variable as an Object. Ideal for arrays!

Specified by:
getObject in class Value

setExpression

public void setExpression(java.lang.String _expression)

copyValue

public void copyValue(Value _source)
Description copied from class: Value
Copies one value into another

Overrides:
copyValue in class Value

cloneValue

public Value cloneValue()
Description copied from class: Value
Clones one value into another

Overrides:
cloneValue in class Value