public abstract class AbstractPropertiesSettings extends java.lang.Object implements Settings
Modifier and Type | Class and Description |
---|---|
static interface |
AbstractPropertiesSettings.PropertyEntry<T> |
Modifier and Type | Field and Description |
---|---|
protected java.util.List<SettingsListener> |
listenerList |
protected java.util.Properties |
properties |
protected java.util.List<AbstractPropertiesSettings.PropertyEntry<?>> |
propertyEntries |
Constructor and Description |
---|
AbstractPropertiesSettings() |
Modifier and Type | Method and Description |
---|---|
void |
addSettingsListener(SettingsListener l)
adds a listener to the settings object
|
protected AbstractPropertiesSettings.PropertyEntry<java.lang.Boolean> |
createBooleanProperty(java.lang.String key,
boolean defValue) |
protected AbstractPropertiesSettings.PropertyEntry<java.lang.Double> |
createDoubleProperty(java.lang.String key,
double defValue) |
protected AbstractPropertiesSettings.PropertyEntry<java.lang.Float> |
createFloatProperty(java.lang.String key,
float defValue) |
protected AbstractPropertiesSettings.PropertyEntry<java.lang.Integer> |
createIntegerProperty(java.lang.String key,
int defValue) |
protected AbstractPropertiesSettings.PropertyEntry<java.util.List<java.lang.String>> |
createStringListProperty(java.lang.String key,
java.lang.String defValue)
Creates a string list property.
|
protected AbstractPropertiesSettings.PropertyEntry<java.lang.String> |
createStringProperty(java.lang.String key,
java.lang.String defValue) |
protected AbstractPropertiesSettings.PropertyEntry<java.util.Set<java.lang.String>> |
createStringSetProperty(java.lang.String key,
java.lang.String defValue) |
protected void |
fireSettingsChange() |
boolean |
isInitialized() |
void |
readSettings(java.util.Properties props)
gets a Properties object and has to perform the necessary
steps in order to change this object in a way that it
represents the stored settings
|
void |
removeSettingsListener(SettingsListener l)
removes a listener to the settings object
|
void |
writeSettings(java.util.Properties props)
The settings to store are written to the given Properties object.
|
protected java.util.Properties properties
protected java.util.List<AbstractPropertiesSettings.PropertyEntry<?>> propertyEntries
protected java.util.List<SettingsListener> listenerList
public boolean isInitialized()
public void readSettings(java.util.Properties props)
Settings
readSettings
in interface Settings
public void writeSettings(java.util.Properties props)
Settings
writeSettings
in interface Settings
props
- the Properties object where to write the settings as (key, value) pairpublic void addSettingsListener(SettingsListener l)
Settings
addSettingsListener
in interface Settings
l
- the listenerpublic void removeSettingsListener(SettingsListener l)
Settings
removeSettingsListener
in interface Settings
l
- the listenerprotected void fireSettingsChange()
protected AbstractPropertiesSettings.PropertyEntry<java.lang.Double> createDoubleProperty(java.lang.String key, double defValue)
protected AbstractPropertiesSettings.PropertyEntry<java.lang.Integer> createIntegerProperty(java.lang.String key, int defValue)
protected AbstractPropertiesSettings.PropertyEntry<java.lang.Float> createFloatProperty(java.lang.String key, float defValue)
protected AbstractPropertiesSettings.PropertyEntry<java.lang.String> createStringProperty(java.lang.String key, java.lang.String defValue)
protected AbstractPropertiesSettings.PropertyEntry<java.lang.Boolean> createBooleanProperty(java.lang.String key, boolean defValue)
protected AbstractPropertiesSettings.PropertyEntry<java.util.Set<java.lang.String>> createStringSetProperty(java.lang.String key, java.lang.String defValue)
protected AbstractPropertiesSettings.PropertyEntry<java.util.List<java.lang.String>> createStringListProperty(@Nonnull java.lang.String key, @Nullable java.lang.String defValue)
key
- the key value of this property inside Properties
instancedefValue
- a default valueAbstractPropertiesSettings.PropertyEntry
Copyright © 2003-2019 The KeY-Project.