|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.generic.util.Properties
com.tensegrity.generic.util.NonPersistentProperties
Derivation of Properties to remove the persistence. Useful for situations where the application does not have the right to load and save files (e.g. applet context)
| Constructor Summary | |
NonPersistentProperties()
Constructor |
|
| Method Summary | |
protected void |
checkFile(java.io.File file)
Overridden to do nothing, because we don't want to persist the data |
void |
clear()
Clears the internal list of properties. |
java.lang.String |
getProperty(java.lang.String key)
Returns the property string previously associated to the parameter key. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Returns the property string previously associated to the parameter key. |
java.util.Set |
keySet()
Returns a set of keys. |
void |
load()
Overridden to do nothing, because we don't want to persist the data |
java.lang.Object |
remove(java.lang.Object key)
Removes a key and corresponding value from this PropertiesFile. |
void |
save(java.lang.String header)
Overridden to do nothing, because we don't want to persist the data |
java.lang.String |
setProperty(java.lang.String key,
java.lang.String value)
Maps the specified key to the specified value in this PropertiesFile. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NonPersistentProperties()
| Method Detail |
public void save(java.lang.String header)
throws java.io.IOException
java.io.IOExceptionProperties.save(java.lang.String)
public void load()
throws java.io.IOException
java.io.IOExceptionProperties.load()protected void checkFile(java.io.File file)
file - the file to check.Properties.checkFile(java.io.File)public void clear()
PropertiesFile
clear in interface PropertiesFilepublic java.lang.String getProperty(java.lang.String key)
PropertiesFilekey. If no such property can be found null
is returned.
getProperty in interface PropertiesFilekey - the key of a property.
key.
public java.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue)
PropertiesFilekey. If no such property can be found
defaultValue is returned.
getProperty in interface PropertiesFilekey - the key of a property.defaultValue - the value which should be returned if no value was
associated with the given key.
key.
public java.lang.String setProperty(java.lang.String key,
java.lang.String value)
PropertiesFilenull is returned. Otherwise the previously mapped value
is returned.
setProperty in interface PropertiesFilekey - the key for the property.value - the value.
public java.lang.Object remove(java.lang.Object key)
PropertiesFile
remove in interface PropertiesFilekey - the key that needs to be removed.
null if the key did not have a mapping.public java.util.Set keySet()
PropertiesFile
keySet in interface PropertiesFile
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||