|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.ejs.control.value.Value
public abstract class Value
A Value
is an object that holds an internal (but public)
variable. This abstract class provides a unified way of acessing the
variable value. The fact the variable is public permits quick access
to it.
When using subclasses, it is a good idea to directly access the internal variable or use the correct 'get' method in order to increase speed.
Using Number
is not suitable for two reasons:
Number
does not include Strings and Objects
Number
does not allow direct access to the
internal variable
Number
Constructor Summary | |
---|---|
Value()
|
Method Summary | |
---|---|
Value |
cloneValue()
Clones one value into another |
void |
copyValue(Value _source)
Copies one value into another |
abstract boolean |
getBoolean()
Returns the value of the variable as a boolean |
abstract double |
getDouble()
Returns the value of the variable as a double |
abstract int |
getInteger()
Returns the value of the variable as an int |
abstract java.lang.Object |
getObject()
Returns the value of the variable as an Object. |
abstract java.lang.String |
getString()
Returns the value of the variable as a String |
static Value |
parseConstant(java.lang.String _input,
boolean _silentMode)
|
static Value |
parseConstantOrArray(java.lang.String _input,
boolean _silentMode)
|
static java.lang.String |
removeScapes(java.lang.String str)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Value()
Method Detail |
---|
public abstract boolean getBoolean()
public abstract int getInteger()
public abstract double getDouble()
public abstract java.lang.String getString()
public abstract java.lang.Object getObject()
public void copyValue(Value _source)
public Value cloneValue()
public java.lang.String toString()
toString
in class java.lang.Object
public static Value parseConstantOrArray(java.lang.String _input, boolean _silentMode)
public static java.lang.String removeScapes(java.lang.String str)
public static Value parseConstant(java.lang.String _input, boolean _silentMode)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |