Package org.esa.snap.core.util
Class DefaultPropertyMap
java.lang.Object
org.esa.snap.core.util.AbstractPropertyMap
org.esa.snap.core.util.DefaultPropertyMap
- All Implemented Interfaces:
PropertyMap
Default implementation of the
PropertyMap interface backed by a Properties instance.- Since:
- SNAP 2
-
Field Summary
Fields inherited from class org.esa.snap.core.util.AbstractPropertyMap
DEFAULT_COLOR, DEFAULT_FONT -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new and empty property map.DefaultPropertyMap(Properties properties) Constructs a property map which uses the givenPropertiesas a key/value container. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddPropertyChangeListener(String key, PropertyChangeListener listener) protected voidfirePropertyChange(String key, String oldValue, String newValue) protected Stringprotected StringReturns thePropertiesinstance in which this property map stores its key/value pairs.Returns an enumeration of the property keys in this map.voidLoads key/value pairs from a text file into this property map.voidvoidremovePropertyChangeListener(String key, PropertyChangeListener listener) protected StringvoidStores the key/value pairs of this property map into a text file.Methods inherited from class org.esa.snap.core.util.AbstractPropertyMap
getPropertyBool, getPropertyBool, getPropertyColor, getPropertyColor, getPropertyDouble, getPropertyDouble, getPropertyFont, getPropertyFont, getPropertyInt, getPropertyInt, getPropertyString, getPropertyString, setPropertyBool, setPropertyColor, setPropertyDouble, setPropertyFont, setPropertyInt, setPropertyString
-
Constructor Details
-
DefaultPropertyMap
public DefaultPropertyMap()Constructs a new and empty property map. -
DefaultPropertyMap
Constructs a property map which uses the givenPropertiesas a key/value container.
-
-
Method Details
-
load
Loads key/value pairs from a text file into this property map.- Parameters:
file- the text file- Throws:
IOException- if an I/O error occurs
-
store
Stores the key/value pairs of this property map into a text file.- Parameters:
file- the text fileheader- an optional file header- Throws:
IOException- if an I/O error occurs
-
getProperties
Returns thePropertiesinstance in which this property map stores its key/value pairs. -
getPropertyKeys
Returns an enumeration of the property keys in this map. -
get
- Specified by:
getin classAbstractPropertyMap
-
get
- Specified by:
getin classAbstractPropertyMap
-
set
- Specified by:
setin classAbstractPropertyMap
-
addPropertyChangeListener
-
addPropertyChangeListener
-
removePropertyChangeListener
-
removePropertyChangeListener
-
firePropertyChange
- Specified by:
firePropertyChangein classAbstractPropertyMap
-