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.ConfigurableBoolean
ConfigurableBoolean extends the Configurable class to contain
an boolean 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. ConfigurableBoolean is also
set up to be an observable.
Source code
is available.
This constructor allows a ConfigurableBoolean to be constructed which exists outside the Configurable heirarchy and does not use its configurable functionality.
This constructor allows a ConfigurableBoolean to be constructed outside of the tree structure, but with short and long names.
This constructor is used to create a full-fledged ConfigurableBoolean with all of the functionality of a Configurable.
This constructor is used to create a full-fledged ConfigurableInteger with all of the functionality of a Configurable.
The intValue() method of ConfigurableInteger returns the value of the ConfigurableInteger as an int.
The set(String) method of ConfigurableInteger takes a string as its argument, (e.g.
We often will want to set the value of our ConfigurableInteger using an int, rather than a string, so we provide a set(int) method.
The toString() method of ConfigurableInteger returns a string representing the value of the ConfigurableInteger.
public ConfigurableBoolean(boolean value)
This constructor allows a ConfigurableBoolean to be constructed which exists outside the Configurable heirarchy and does not use its configurable functionality.
public ConfigurableBoolean(boolean value,
String shortName,
String longName)
This constructor allows a ConfigurableBoolean to be constructed outside of the tree structure, but with short and long names.
public ConfigurableBoolean(ConfigurableCollection parent,
String shortName,
String longName,
int att,
boolean defaultVal)
This constructor is used to create a full-fledged ConfigurableBoolean with all of the functionality of a Configurable. It takes a boolean default value, rather than a String.
public ConfigurableBoolean(ConfigurableCollection parent,
String shortName,
String longName,
int att,
String defaultVal)
This constructor is used to create a full-fledged ConfigurableInteger 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 ConfigurableInteger takes a string as its argument, (e.g. "15") and uses it to set the value of the ConfigurableInteger. Observers will be notified of the change.
true is returned if the set is successful, false if unsuccessful.
public void set(boolean value)
We often will want to set the value of our ConfigurableInteger using an int, rather than a string, so we provide a set(int) method. Observers are notified of the change in value.
public String toString()
The toString() method of ConfigurableInteger returns a string representing the value of the ConfigurableInteger.
public boolean booleanValue()
The intValue() method of ConfigurableInteger returns the value of the ConfigurableInteger as an int.
All Packages Class Hierarchy This Package Previous Next Index