|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
java.util.HashMap
com.crystaldecisions.sdk.occa.report.lib.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)
Constructs a new property bag with the same properties as the specified PropertyBag object.
|
Method Summary | |
java.lang.Object |
clone(boolean deepClone)
Returns the new object that has been cloned. |
void |
copyTo(java.lang.Object destObj,
boolean deepCopy)
Copies the object. |
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. |
boolean |
hasContent(java.lang.Object obj)
Returns true if this object contains the same elements
as the passed in object. |
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 java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
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)
Constructs a new property bag with the same properties as the specified PropertyBag
object.
This is equivalent to creating a new copy.
src
- The PropertyBag
object to be copied.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)
IClone
Returns the new object that has been cloned.
clone
in interface IClone
deepClone
- true
to use deep clone,
false
to use shallow.
public void copyTo(java.lang.Object destObj, boolean deepCopy)
IClone
Copies the object.
copyTo
in interface IClone
destObj
- The destination object to copy to.deepCopy
- true
to use deep copy,
false
to use shallow.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)
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.public double getDoubleValue(java.lang.Object key)
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.public int getIntValue(java.lang.Object key)
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.public 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 boolean hasContent(java.lang.Object obj)
IClone
Returns true
if this object contains the same elements
as the passed in object.
hasContent
in interface IClone
obj
- The object to check for content.
true
if this object contains the same elements
as the passed in object, otherwise false
.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 |