All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----java.util.Observable
|
+----edu.cornell.lassp.mck10.ConfigurePack.Configurable
|
+----edu.cornell.lassp.mck10.ConfigurePack.ConfigurableDouble
ConfigurableDouble extends the Configurable class to contain
a double variable, and provides new methods for the world
to interface with that variable. It overrides the set(String) methods
and the toString() methods of Configurable. ConfigurableDouble is also
set up to be an observable.
Source code
is available.
This constructor allows a ConfigurableDouble to be constructed which exists outside the Configurable heirarchy and does not use its configurable functionality.
This constructor allows a ConfigurableDouble to be constructed outside of the tree structure, but with short and long names.
This constructor is used to create a full-fledged ConfigurableDouble with all of the functionality of a Configurable.
This constructor is used to create a full-fledged ConfigurableDouble with all of the functionality of a Configurable.
The doubleValue() method of ConfigurableDouble returns the value of the ConfigurableDouble as a double.
The set(String) method of ConfigurableDouble takes a string as its argument, (e.g.
We often will want to set the value of our ConfigurableDouble using a double, rather than a string, so we provide a set(double) method.
The toString() method of ConfigurableDouble returns a string representing the value of the ConfigurableDouble.
public ConfigurableDouble(double value)
This constructor allows a ConfigurableDouble to be constructed which exists outside the Configurable heirarchy and does not use its configurable functionality.
public ConfigurableDouble(double value,
String shortName,
String longName)
This constructor allows a ConfigurableDouble to be constructed outside of the tree structure, but with short and long names.
public ConfigurableDouble(ConfigurableCollection parent,
String shortName,
String longName,
int att,
double defaultVal)
This constructor is used to create a full-fledged ConfigurableDouble with all of the functionality of a Configurable. It takes a double default value, rather than a String.
public ConfigurableDouble(ConfigurableCollection parent,
String shortName,
String longName,
int att,
String defaultVal)
This constructor is used to create a full-fledged ConfigurableDouble with all of the functionality of a Configurable. It takes a String to set the default value.
public boolean set(String value)
The set(String) method of ConfigurableDouble takes a string as its argument, (e.g. "0.5 E 15") and uses it to set the value of the ConfigurableDouble. Observers will be notified of the change.
true is returned if the set is successful, false if unsuccessful.
public void set(double value)
We often will want to set the value of our ConfigurableDouble using a double, rather than a string, so we provide a set(double) method. Observers are notified of the change in value.
public String toString()
The toString() method of ConfigurableDouble returns a string representing the value of the ConfigurableDouble.
public double doubleValue()
The doubleValue() method of ConfigurableDouble returns the value of the ConfigurableDouble as a double.
All Packages Class Hierarchy This Package Previous Next Index