|
miSim | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--misim.util.SettingsGroup
A SettingsGroup contains a named collection of settings
Constructor Summary | |
SettingsGroup(java.lang.String groupName)
Constructor. |
Method Summary | |
void |
addSetting(Setting aSetting)
Add a setting to this group |
int |
countSettings()
Return the number of settings that this group contains |
int |
countSettings(java.lang.String settingName)
Return the number of settings with the given name that this group contains. |
java.lang.String |
getName()
Return the name of this settings group |
Setting |
getSetting(int index)
Return the setting at a given index in this group |
Setting |
getSetting(java.lang.String settingName)
Retrieve a setting from this group by name. |
Setting |
getSetting(java.lang.String settingName,
int index)
Retrieve a setting from this group by name and index. |
boolean |
getSettingBoolean(java.lang.String settingName,
boolean defaultValue)
Get the value of a setting from this group by name. |
int |
getSettingIntValue(java.lang.String settingName,
int defaultValue)
Get the value of a setting from this group by name. |
java.lang.String |
getSettingValue(java.lang.String settingName,
java.lang.String defaultValue)
Get the value of a setting from this group by name. |
void |
removeSetting(Setting aSetting)
Remove a setting from this group |
void |
updateSetting(Setting aSetting)
Update the first setting that matches this setting by name in this group. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SettingsGroup(java.lang.String groupName)
groupName
- The name for this settings groupMethod Detail |
public java.lang.String getName()
public void addSetting(Setting aSetting)
aSetting
- The setting to be addedpublic void updateSetting(Setting aSetting)
aSetting
- The setting to be updatedpublic void removeSetting(Setting aSetting)
aSetting
- The setting to be removedpublic Setting getSetting(java.lang.String settingName)
settingName
- The name of the setting to be retrievedpublic Setting getSetting(java.lang.String settingName, int index)
settingName
- The name of the setting to be retrievedindex
- The index of the setting to retrievepublic java.lang.String getSettingValue(java.lang.String settingName, java.lang.String defaultValue)
settingName
- The name of the setting to be retrieveddefaultValue
- A default value to return if the setting is not foundpublic int getSettingIntValue(java.lang.String settingName, int defaultValue)
settingName
- The name of the setting to be retrieveddefaultValue
- A default value to return if the setting is not foundpublic boolean getSettingBoolean(java.lang.String settingName, boolean defaultValue)
settingName
- The name of the setting to be retrieveddefaultValue
- A default value to return if the setting is not foundpublic int countSettings()
public int countSettings(java.lang.String settingName)
settingName
- The name of the setting to count.public Setting getSetting(int index)
index
- The index of the setting to retrieve
|
miSim | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |