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.ConfigurableInteger
ConfigurableInteger extends the Configurable class to contain
an int 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. ConfigurableInteger is also
set up to be an observable.
Source code
is available.
This constructor allows a ConfigurableInteger to be constructed which exists outside the Configurable heirarchy and does not use its configurable functionality.
This constructor allows a ConfigurableInteger to be constructed outside of the tree structure, but with short and long names.
This constructor is used to create a full-fledged ConfigurableInteger 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 ConfigurableInteger(int value)
This constructor allows a ConfigurableInteger to be constructed which exists outside the Configurable heirarchy and does not use its configurable functionality.
public ConfigurableInteger(int value,
String shortName,
String longName)
This constructor allows a ConfigurableInteger to be constructed outside of the tree structure, but with short and long names.
public ConfigurableInteger(ConfigurableCollection parent,
String shortName,
String longName,
int att,
int defaultVal)
This constructor is used to create a full-fledged ConfigurableInteger with all of the functionality of a Configurable. It takes an int default value, rather than a String.
public ConfigurableInteger(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(int 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 int intValue()
The intValue() method of ConfigurableInteger returns the value of the ConfigurableInteger as an int.
All Packages Class Hierarchy This Package Previous Next Index