org.gjt.rec.util
Class ResourceSettings

java.lang.Object
  |
  +--org.gjt.rec.util.AbstractSettings
        |
        +--org.gjt.rec.util.ResourceSettings
All Implemented Interfaces:
Settings

public class ResourceSettings
extends AbstractSettings
implements Settings

Presents the contents of a resource bundle through the Settings interface.

Author:
Neil Stockbridge
See Also:
Settings

Field Summary
static String REVISION
           
 
Constructor Summary
ResourceSettings(ResourceBundle b)
          Constructs a new ResourceSettings object using the supplied resource bundle as inspiration for the settings.
 
Method Summary
 Object get(String name)
          Looks up the value of a setting.
 Iterator getNames()
          Returns an Iterator over the names of each setting in this settings object.
 void remove(String name)
          Removes a setting.
 void set(String name, Object value)
          Sets the value of a setting.
 
Methods inherited from class org.gjt.rec.util.AbstractSettings
addSettingsListener, fireSettingsChanged, removeSettingsListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gjt.rec.util.Settings
addSettingsListener, removeSettingsListener
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

ResourceSettings

public ResourceSettings(ResourceBundle b)
Constructs a new ResourceSettings object using the supplied resource bundle as inspiration for the settings.

Parameters:
b - the supplied resource bundle
Method Detail

getNames

public Iterator getNames()
Description copied from interface: Settings
Returns an Iterator over the names of each setting in this settings object.

Specified by:
getNames in interface Settings

get

public Object get(String name)
Description copied from interface: Settings
Looks up the value of a setting.

Specified by:
get in interface Settings
Parameters:
name - the name of the setting to look up
Returns:
the value of the named setting or null if there was no setting by the that name.

set

public void set(String name,
                Object value)
Description copied from interface: Settings
Sets the value of a setting.

Specified by:
set in interface Settings
Parameters:
name - the name of the setting to set the value of
value - the (new) value of the setting

remove

public void remove(String name)
Description copied from interface: Settings
Removes a setting.

Specified by:
remove in interface Settings
Parameters:
name - the name of the setting to remove