|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.freeshell.zs.common.SimpleProperties
public class SimpleProperties
Represent a collection of properties, each denoted by a key-value pair. This class is synchronized to allow simultaneous access; however, it must be externally synchronized when iterating through its keys and values.
| Constructor Summary | |
|---|---|
SimpleProperties()
Constructor. |
|
SimpleProperties(SimpleProperties defaultProperties)
Constructor. |
|
SimpleProperties(java.lang.String defaultProperties)
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.Object |
get(java.lang.String key)
Get the property value corresponding to the specified key. |
java.lang.String |
getAsString(java.lang.String key)
Get the property value (cast as a String) corresponding to the specified key. |
boolean |
getBoolean(java.lang.String key)
Get the property value (cast as a boolean) corresponding to the specified key. |
java.io.File |
getFile(java.lang.String key)
Get the property value (cast as a File) corresponding to the specified key. |
int |
getInt(java.lang.String key)
Get the property value (cast as an int) corresponding to the specified key. |
long |
getLong(java.lang.String key)
Get the property value (cast as a long) corresponding to the specified key. |
java.lang.String |
getString(java.lang.String key)
Get the property value (cast as a String) corresponding to the specified key. |
java.util.Set<java.lang.String> |
keySet()
Get the set of keys in this collection of properties. |
void |
set(java.lang.String key,
java.lang.Object value)
Set the property value corresponding to the specified key. |
void |
setBoolean(java.lang.String key,
boolean value)
Set the property value (a boolean) corresponding to the specified key. |
void |
setFile(java.lang.String key,
java.io.File value)
Set the property value (a File) corresponding to the specified key. |
void |
setInt(java.lang.String key,
int value)
Set the property value (an int) corresponding to the specified key. |
void |
setLong(java.lang.String key,
long value)
Set the property value (a long) corresponding to the specified key. |
void |
setString(java.lang.String key,
java.lang.String value)
Set the property value (a String) corresponding to the specified key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleProperties()
public SimpleProperties(SimpleProperties defaultProperties)
defaultProperties - default propertiespublic SimpleProperties(java.lang.String defaultProperties)
defaultProperties - default properties| Method Detail |
|---|
public java.util.Set<java.lang.String> keySet()
public java.lang.Object get(java.lang.String key)
key - key
public void set(java.lang.String key,
java.lang.Object value)
key - keyvalue - property valuepublic java.lang.String getAsString(java.lang.String key)
key - key
public java.lang.String getString(java.lang.String key)
key - key
public void setString(java.lang.String key,
java.lang.String value)
key - keyvalue - property value (a String)public boolean getBoolean(java.lang.String key)
key - key
public void setBoolean(java.lang.String key,
boolean value)
key - keyvalue - property value (a boolean)public int getInt(java.lang.String key)
key - key
public void setInt(java.lang.String key,
int value)
key - keyvalue - property value (an int)public long getLong(java.lang.String key)
key - key
public void setLong(java.lang.String key,
long value)
key - keyvalue - property value (a long)public java.io.File getFile(java.lang.String key)
key - key
public void setFile(java.lang.String key,
java.io.File value)
key - keyvalue - property value (a File)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||