|
org.netbeans.modules.server/0 1.20 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.api.server.properties.InstanceProperties
public abstract class InstanceProperties
The set of properties to persist. Every property set is persisted unless
the whole object is not removed by the remove() call.
In the scope of namespace used in InstancePropertiesManager
the object has assigned unique id identifying it.
| Constructor Summary | |
|---|---|
InstanceProperties(String id)
Creates the new InstanceProperties. |
|
| Method Summary | |
|---|---|
abstract boolean |
getBoolean(String key,
boolean def)
Returns the value of the given property. |
abstract double |
getDouble(String key,
double def)
Returns the value of the given property. |
abstract float |
getFloat(String key,
float def)
Returns the value of the given property. |
String |
getId()
Returns unique id of these properties. |
abstract int |
getInt(String key,
int def)
Returns the value of the given property. |
abstract long |
getLong(String key,
long def)
Returns the value of the given property. |
abstract String |
getString(String key,
String def)
Returns the value of the given property. |
abstract void |
putBoolean(String key,
boolean value)
Associates the specified value with the specified property. |
abstract void |
putDouble(String key,
double value)
Associates the specified value with the specified property. |
abstract void |
putFloat(String key,
float value)
Associates the specified value with the specified property. |
abstract void |
putInt(String key,
int value)
Associates the specified value with the specified property. |
abstract void |
putLong(String key,
long value)
Associates the specified value with the specified property. |
abstract void |
putString(String key,
String value)
Associates the specified value with the specified property. |
abstract void |
remove()
Removes this instance from the persistent space. |
abstract void |
removeKey(String key)
Removes the value of the given property, if any. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InstanceProperties(String id)
id - id of the properties, unique in the scope of the namespaceInstancePropertiesManager| Method Detail |
|---|
public final String getId()
Client may use it for its own purposes (don't have to), but client can't influence the actual value of id in any way.
InstancePropertiesManager,
InstancePropertiesManager.createProperties(String)
public abstract String getString(String key,
String def)
putString(String, String).
key - name of the propertydef - default value
public abstract void putString(String key,
String value)
getString(String, String).
key - name of the propertyvalue - value to set
public abstract boolean getBoolean(String key,
boolean def)
putBoolean(String, boolean).
key - name of the propertydef - default value
public abstract void putBoolean(String key,
boolean value)
getBoolean(String, boolean).
key - name of the propertyvalue - value to set
public abstract int getInt(String key,
int def)
Integer.parseInt(String). However this method
is designed to be used in conjuction with putInt(String, int).
key - name of the propertydef - default value
public abstract void putInt(String key,
int value)
getInt(String, int).
key - name of the propertyvalue - value to set
public abstract long getLong(String key,
long def)
Long.parseLong(String). However this method
is designed to be used in conjuction with putLong(String, long).
key - name of the propertydef - default value
public abstract void putLong(String key,
long value)
getLong(String, long).
key - name of the propertyvalue - value to set
public abstract float getFloat(String key,
float def)
Float.parseFloat(String). However this method
is designed to be used in conjuction with
putFloat(String, float).
key - name of the propertydef - default value
public abstract void putFloat(String key,
float value)
getFloat(String, float).
key - name of the propertyvalue - value to set
public abstract double getDouble(String key,
double def)
Double.parseDouble(String). However this method
is designed to be used in conjuction with
putDouble(String, double).
key - name of the propertydef - default value
public abstract void putDouble(String key,
double value)
getDouble(String, double).
key - name of the propertyvalue - value to setpublic abstract void removeKey(String key)
key - name of the propertypublic abstract void remove()
InstancePropertiesManager.getProperties(String) with appropriate
parameter will not contain this set of properties anymore.
Return value of any method after removal is not defined and most
likely will lead to IllegalStateException.
|
org.netbeans.modules.server/0 1.20 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||