Package org.esa.snap.core.util
Interface PropertyMap
-
- All Known Implementing Classes:
AbstractPropertyMap
,DefaultPropertyMap
,PreferencesPropertyMap
public interface PropertyMap
ThePropertyMap
class can be used instead of the standard JDKjava.util.Properties
class.PropertyMap
provides a generally more useful interface by adding a couple type conversion methods for a set of most frequently used data types, such asBoolean
,Integer
,Double
,Color
andFont
.Additionally the class provides property change support.
- Since:
- SNAP 2 (revision)
-
-
Method Summary
-
-
-
Method Detail
-
load
void load(Path file) throws IOException
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
void store(Path file, String header) throws IOException
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
Properties getProperties()
Returns theProperties
instance in which this property map stores its key/value pairs.
-
getPropertyKeys
Set<String> getPropertyKeys()
Returns an enumeration of the property keys in this map.
-
getPropertyBool
boolean getPropertyBool(String key)
-
getPropertyInt
int getPropertyInt(String key)
-
getPropertyDouble
double getPropertyDouble(String key)
-
addPropertyChangeListener
void addPropertyChangeListener(PropertyChangeListener listener)
-
addPropertyChangeListener
void addPropertyChangeListener(String key, PropertyChangeListener listener)
-
removePropertyChangeListener
void removePropertyChangeListener(PropertyChangeListener listener)
-
removePropertyChangeListener
void removePropertyChangeListener(String key, PropertyChangeListener listener)
-
-