|
Jumpi v1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A collection interface for String key, value pairs. Essentially identical to
J2SE java.util.Properties. Define our own properties since
MIDP does not provide java.util.Properties and a major design
goal of Jumpi is to keep multiple Java Platform compliancy of the spi
interface.
Although only used within a single threaded context, a Properties
implementation should be fully thread-safe for set, get and remove
operations. Using keys() is only allowed after flagging the Properties as
being read-only setReadOnly().
| Method Summary | |
java.lang.String |
get(java.lang.String name)
Get the value of the named property. |
java.lang.String |
get(java.lang.String name,
java.lang.String def)
Get the value of the named property if existing otherwise return the provided default value. |
java.util.Enumeration |
keys()
Return all the property names. |
void |
remove(java.lang.String name)
Remove the named property. |
void |
set(java.lang.String name,
java.lang.String value)
Add the property. |
void |
setReadOnly()
Make the properties invariant. |
int |
size()
Return the number of properties in the collection. |
| Method Detail |
public void set(java.lang.String name,
java.lang.String value)
name - the name of the property.value - the value of the property.
java.lang.IllegalArgumentException - if either name or value are null.
java.lang.IllegalStateException - if read only.get(java.lang.String),
setReadOnly()public java.lang.String get(java.lang.String name)
name - the name of the property.
java.lang.IllegalArgumentException - if name is null.set(java.lang.String, java.lang.String)
public java.lang.String get(java.lang.String name,
java.lang.String def)
name - the name of the property.def - the default value of the property
java.lang.IllegalArgumentException - if name is null.set(java.lang.String, java.lang.String)public void remove(java.lang.String name)
name - the name of the property to remove.
java.lang.IllegalArgumentException - if name is null.
java.lang.IllegalStateException - if read only.setReadOnly()public void setReadOnly()
set(java.lang.String, java.lang.String),
remove(java.lang.String)public java.util.Enumeration keys()
java.lang.IllegalStateException - when not read only.public int size()
|
Jumpi v1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||