|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IProperties
This interface defines a collection of properties.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry |
| Method Summary | |
|---|---|
IProperty |
add(java.lang.Object id,
java.lang.Object value,
int flags)
Adds a new property to the collection. |
IProperties |
addProperties(java.lang.Object id)
Adds a new empty property bag to the collection. |
IProperties |
copyAll()
Return a copy of this properties(deep copy). |
boolean |
getBoolean(java.lang.Object id)
Returns the boolean value of the specified property. |
java.util.Date |
getDate(java.lang.Object id)
Returns the Date value of the specified property. |
int |
getInt(java.lang.Object id)
Returns the int value of the specified property. |
long |
getLong(java.lang.Object id)
Returns the long value of the specified property. |
IProperties |
getProperties(java.lang.Object id)
Return the property bag of the specified id. |
IProperties |
getProperties(java.lang.Object id,
boolean createIfNotExist)
Return the property bag of the specified id. |
IProperty |
getProperty(java.lang.Object id)
Returns the specified property if the property exists, null otherwise. |
java.lang.String |
getString(java.util.Locale locale)
Returns String value of the locale is the key identifying the string to retrieve. |
java.lang.String |
getString(java.util.Locale loc,
java.util.Locale fallbackLocale,
java.lang.String defaultValue)
Returns String value of the locale is the key identifying the string to retrieve if the specified locale string is not found, use fallbackLocale instead, if still not found, defaultValue is returned. |
java.lang.String |
getString(java.lang.Object id)
Returns the string value of the specified property. |
java.lang.Object |
removeLocal(java.lang.Object key)
|
void |
setProperty(java.lang.Object id,
boolean value)
Sets the property's value as a boolean. |
void |
setProperty(java.lang.Object id,
int value)
Sets the property's value as an int. |
void |
setProperty(java.lang.Object id,
long value)
Sets the property's value as a long. |
void |
setProperty(java.lang.Object id,
java.lang.Object value)
Sets the property's value. |
void |
setString(java.util.Locale locale,
java.lang.String message)
Set a string into the current property bag and use locale as the key. |
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Method Detail |
|---|
IProperty add(java.lang.Object id,
java.lang.Object value,
int flags)
Adds a new property to the collection. You can use the flag to mark the property as read-only, binary, changed, and so on.
If you do not want the property to be marked with a flag, set the flag as 0. For a list
of valid flags, refer to IProperty. If the flag is set to IProperty.BAG, a new, empty property bag is added.
id - The ID of the property.value - The value of the property to be added.flags - The flag to be used.
IProperty object containing the requested property.IProperties addProperties(java.lang.Object id)
Adds a new empty property bag to the collection. This is similar to use add with flag set to IProperty.BAG.
id - The ID of the propertybag.
IProperties object returned.IProperty getProperty(java.lang.Object id)
Returns the specified property if the property exists, null otherwise.
id - The ID of the property to be returned.
IProperty object containing the value of the property, or null if the property does not exist.java.lang.String getString(java.lang.Object id)
Returns the string value of the specified property.
String containing the value of the property, or null if the property does not exist.int getInt(java.lang.Object id)
Returns the int value of the specified property.
int containing the value of the property, or 0 if the property does not exist.java.util.Date getDate(java.lang.Object id)
Returns the Date value of the specified property.
Date object containing the value of the property, or null if the property does not exist.boolean getBoolean(java.lang.Object id)
Returns the boolean value of the specified property.
boolean containing the value of the property, or false if the property does not exist.long getLong(java.lang.Object id)
Returns the long value of the specified property.
long containing the value of the property, or 0 if the property does not exist.
java.lang.String getString(java.util.Locale locale)
throws SDKException
Returns String value of the locale is the key identifying the string to retrieve.
String containing the value of the property, or null if the property does not exist.
SDKException
java.lang.String getString(java.util.Locale loc,
java.util.Locale fallbackLocale,
java.lang.String defaultValue)
Returns String value of the locale is the key identifying the string to retrieve
if the specified locale string is not found, use fallbackLocale instead,
if still not found, defaultValue is returned.
String containing the value of the property, or null if the property does not exist.
void setString(java.util.Locale locale,
java.lang.String message)
Set a string into the current property bag and use locale as the key.
locale - key of the message in the current property bag.message - the string value .IProperties getProperties(java.lang.Object id)
Return the property bag of the specified id.
id - The ID of the properties to be returned.
IProperties if the bag exists, null otherwise.
IProperties getProperties(java.lang.Object id,
boolean createIfNotExist)
Return the property bag of the specified id.
id - The ID of the properties to be returned.createIfNotExists - A boolean indicate whether a bag should be created if specified ID is not found. True creates a bag, False won't.
IProperties if the bag exists, null otherwise if createIfNotExists is false, new bag if createIfNotExists is true.
void setProperty(java.lang.Object id,
java.lang.Object value)
Sets the property's value.
id - The ID of the property to be set.value - The value that the property should be set to.
void setProperty(java.lang.Object id,
int value)
Sets the property's value as an int.
id - The ID of the property to be set.value - The value that the property should be set to.
void setProperty(java.lang.Object id,
long value)
Sets the property's value as a long.
id - The ID of the property to be set.value - The value that the property should be set to.
void setProperty(java.lang.Object id,
boolean value)
Sets the property's value as a boolean.
id - The ID of the property to be set.value - The value that the property should be set to.java.lang.Object removeLocal(java.lang.Object key)
IProperties copyAll()
Return a copy of this properties(deep copy).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||