public class PropertiesComponentImpl extends PropertiesComponent implements PersistentStateComponent<Element>
EVER_CHANGED, NEVER_CHANGED
Modifier and Type | Method and Description |
---|---|
Element |
getState() |
java.lang.String |
getValue(java.lang.String name) |
java.lang.String [] |
getValues(java.lang.String name) |
boolean |
isValueSet(java.lang.String name) |
void |
loadState(Element parentNode)
This method is called when new component state is loaded.
|
void |
setValue(java.lang.String name,
boolean value,
boolean defaultValue)
Set value or unset if equals to default
|
void |
setValue(java.lang.String name,
float value,
float defaultValue)
Set value or unset if equals to default value
|
void |
setValue(java.lang.String name,
int value,
int defaultValue)
Set value or unset if equals to default value
|
void |
setValue(java.lang.String name,
java.lang.String value)
Consider to use
PropertiesComponent.setValue(String, String, String) to avoid write defaults. |
void |
setValue(java.lang.String name,
java.lang.String value,
java.lang.String defaultValue)
Set value or unset if equals to default value
|
void |
setValues(java.lang.String name,
java.lang.String[] values) |
void |
unsetValue(java.lang.String name) |
getBoolean, getBoolean, getFloat, getInstance, getInstance, getInt, getLong, getOrInit, getOrInitInt, getOrInitLong, getValue, isTrueValue, loadFields, saveFields, setValue
getModificationCount, incModificationCount
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeComponent, noStateLoaded
public Element getState()
getState
in interface PersistentStateComponent<Element>
null
value indicates
that the returned state won't be stored, as a result previously stored state will be used.XmlSerializer
public void loadState(Element parentNode)
PersistentStateComponent
State object should be used directly, defensive copying is not required.
loadState
in interface PersistentStateComponent<Element>
parentNode
- loaded component stateXmlSerializerUtil.copyBean(Object, Object)
public java.lang.String getValue(java.lang.String name)
getValue
in class PropertiesComponent
public void setValue(java.lang.String name, java.lang.String value)
PropertiesComponent
PropertiesComponent.setValue(String, String, String)
to avoid write defaults.setValue
in class PropertiesComponent
public void setValue(java.lang.String name, java.lang.String value, java.lang.String defaultValue)
PropertiesComponent
setValue
in class PropertiesComponent
public void setValue(java.lang.String name, float value, float defaultValue)
PropertiesComponent
setValue
in class PropertiesComponent
public void setValue(java.lang.String name, int value, int defaultValue)
PropertiesComponent
setValue
in class PropertiesComponent
public void setValue(java.lang.String name, boolean value, boolean defaultValue)
PropertiesComponent
setValue
in class PropertiesComponent
public void unsetValue(java.lang.String name)
unsetValue
in class PropertiesComponent
public boolean isValueSet(java.lang.String name)
isValueSet
in class PropertiesComponent
public java.lang.String [] getValues(java.lang.String name)
getValues
in class PropertiesComponent
public void setValues(java.lang.String name, java.lang.String[] values)
setValues
in class PropertiesComponent