|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<K,V>
com.crystaldecisions.sdk.occa.report.lib.ClonableMap<K,V>
com.crystaldecisions.sdk.occa.report.lib.ControllableMap<java.lang.Object,java.lang.Object>
com.crystaldecisions.sdk.occa.report.lib.PropertyBag
public class PropertyBag
This class defines a property bag that stores a list of properties. The properties contained in the
bag may be of different types: they may be any of the primitive types, or an object. Use the
get
and put
methods to retrieve and store properties.
Constructor Summary | |
---|---|
PropertyBag()
Constructs an empty property bag with the default capacity and load factor. |
|
PropertyBag(java.util.Map defaults)
Constructs a new property bag with the same mappings as the given map. |
|
PropertyBag(PropertyBag src)
|
Method Summary | |
---|---|
java.lang.Object |
clone(boolean deepClone)
|
java.lang.Object |
createMember(java.lang.String eleName,
org.xml.sax.Attributes attrs,
XMLSerializationContext ctxt,
java.util.Map objState,
boolean[] bLoaded)
For internal use only. |
void |
endElement(java.lang.String eleName,
java.util.Map objState)
For internal use only. |
boolean |
getBooleanValue(java.lang.Object key)
Converts a value in the property bag and returns it as a boolean value.
0 is treated as false . |
double |
getDoubleValue(java.lang.Object key)
Converts a value in the property bag and returns it as a double value. |
int |
getIntValue(java.lang.Object key)
Converts a value in the property bag and returns it as an int value. |
IStrings |
getPropertyIDs()
Returns a list of IDs for all the properties stored in the property bag. |
java.lang.String |
getStringValue(java.lang.Object key)
Converts a value in the property bag and returns it as a string value. |
void |
putBooleanValue(java.lang.Object key,
boolean value)
Associates the supplied property ID with the specified boolean . |
void |
putDoubleValue(java.lang.Object key,
double value)
Associates the supplied property ID with the specified double . |
void |
putIntValue(java.lang.Object key,
int value)
Associates the supplied property ID with the specified int . |
void |
putStringValue(java.lang.Object key,
java.lang.String value)
Associates the supplied property ID with the specified String . |
void |
readElement(java.lang.String eleName,
java.lang.String sVal,
org.xml.sax.Attributes attrs,
java.util.Map objState)
For internal use only. |
void |
save(XMLWriter writer,
java.lang.String sTag,
XMLSerializationContext ctxt)
For internal use only. |
void |
save(XMLWriter writer,
XMLSerializationContext ctxt)
For internal use only. |
void |
saveContents(XMLWriter writer,
XMLSerializationContext ctxt)
For internal use only. |
boolean |
skipWritingIdenticalObject()
For internal use only. |
void |
startElement(java.lang.String eleName,
java.util.Map objState,
org.xml.sax.Attributes attrs)
For internal use only. |
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ControllableMap |
---|
clear, doControllerModification, entrySet, enumerateMembers, getControllableMixin, isDirectlyControllable, keySet, put, putAll, remove, values |
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ClonableMap |
---|
copyTo, hasContent |
Methods inherited from class java.util.HashMap |
---|
clone, containsKey, containsValue, get, isEmpty, size |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public PropertyBag(PropertyBag src)
public PropertyBag()
Constructs an empty property bag with the default capacity and load factor.
public PropertyBag(java.util.Map defaults)
Constructs a new property bag with the same mappings as the given map.
defaults
- The map whose mappings are to be placed in this property bag.Method Detail |
---|
public java.lang.Object clone(boolean deepClone)
clone
in class ClonableMap<java.lang.Object,java.lang.Object>
public java.lang.Object createMember(java.lang.String eleName, org.xml.sax.Attributes attrs, XMLSerializationContext ctxt, java.util.Map objState, boolean[] bLoaded)
For internal use only.
public void endElement(java.lang.String eleName, java.util.Map objState)
For internal use only.
public boolean getBooleanValue(java.lang.Object key) throws java.lang.NullPointerException
Converts a value in the property bag and returns it as a boolean
value.
0 is treated as false
. All other numbers (positive and negative) are treated as true
.
The string "No" is converted to false
, while the string "Yes" is converted to true
.
The strings "True" and "False" can also be used. A non-zero, numeric string will return true
.
If the value cannot be converted, the property fails.
key
- The ID of the property to convert and return.
boolean
corresponding to the value of the specified key.
java.lang.NullPointerException
- if the key doesn't existpublic double getDoubleValue(java.lang.Object key) throws java.lang.NullPointerException
Converts a value in the property bag and returns it as a double
value.
If the value cannot be converted, the property fails.
key
- The ID of the property to convert and return.
double
corresponding to the value of the specified key.
java.lang.NullPointerException
- if the key doesn't existpublic int getIntValue(java.lang.Object key) throws java.lang.NullPointerException
Converts a value in the property bag and returns it as an int
value.
key
- The ID of the property to convert and return.
int
corresponding to the value of the specified key.
java.lang.NullPointerException
- if the key doesn't existpublic IStrings getPropertyIDs()
Returns a list of IDs for all the properties stored in the property bag.
You can use this list together with the get
method to enumerate through all the items in
the property bag.
IStrings
object containing a list of IDs for all the properties stored in the
property bag.public java.lang.String getStringValue(java.lang.Object key)
Converts a value in the property bag and returns it as a string value. If the value cannot be converted, the property fails.
key
- The ID of the property to convert and return.
String
corresponding to the value of the specified key.public void putBooleanValue(java.lang.Object key, boolean value)
Associates the supplied property ID with the specified boolean
.
key
- The ID of the property to assign the value to.value
- The boolean
value of the specified property ID.public void putDoubleValue(java.lang.Object key, double value)
Associates the supplied property ID with the specified double
.
key
- The ID of the property to assign the value to.value
- The double
value of the specified property ID.public void putIntValue(java.lang.Object key, int value)
Associates the supplied property ID with the specified int
.
key
- The ID of the property to assign the value to.value
- The int
value of the specified property ID.public void putStringValue(java.lang.Object key, java.lang.String value)
Associates the supplied property ID with the specified String
.
key
- The ID of the property to assign the value to.value
- The String
value of the specified property ID.public void readElement(java.lang.String eleName, java.lang.String sVal, org.xml.sax.Attributes attrs, java.util.Map objState)
For internal use only.
public void save(XMLWriter writer, XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
java.io.IOException
public void save(XMLWriter writer, java.lang.String sTag, XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
java.io.IOException
public void saveContents(XMLWriter writer, XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
java.io.IOException
public void startElement(java.lang.String eleName, java.util.Map objState, org.xml.sax.Attributes attrs)
For internal use only.
public boolean skipWritingIdenticalObject()
For internal use only.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |