public class MutableProperties extends XmlArchivedProperties
Modifier and Type | Class and Description |
---|---|
static interface |
MutableProperties.Mutator
A piece of code that updates an object of this class.
|
Constructor and Description |
---|
MutableProperties()
Constructs an empty map of properties.
|
MutableProperties(java.lang.String xml)
Constructs a map of updatable properties from the XML representation of
the map.
|
MutableProperties(XmlArchivedProperties p)
Constructs a map of updatable properties and initializes it with the
entries from another map.
|
Modifier and Type | Method and Description |
---|---|
MutableProperties |
getMutableProperties(java.lang.String name)
Returns the value of the property specified by a name as an
MutableProperties object. |
void |
setBigDecimal(java.lang.String name,
java.math.BigDecimal value)
Sets the value of a property.
|
void |
setBigInteger(java.lang.String name,
java.math.BigInteger value)
Sets the value of a property.
|
void |
setBoolean(java.lang.String name,
boolean b)
Sets the value of a property.
|
void |
setDate(java.lang.String name,
java.util.Date date)
Sets the value of a property.
|
void |
setDouble(java.lang.String name,
java.lang.Double value)
Sets the value of a property.
|
void |
setInteger(java.lang.String name,
java.lang.Integer value)
Sets the value of a property.
|
void |
setLong(java.lang.String name,
java.lang.Long value)
Sets the value of a property.
|
void |
setLongArray(java.lang.String name,
java.lang.Long[] value)
Sets the value of a property.
|
void |
setString(java.lang.String name,
java.lang.String value)
Sets the value of a property.
|
void |
setStringArray(java.lang.String name,
java.lang.String[] value)
Sets the value of a property.
|
void |
setXmlArchivedProperties(java.lang.String name,
XmlArchivedProperties value)
Sets the value of a property.
|
void |
setXmlArchivedPropertiesArray(java.lang.String name,
XmlArchivedProperties[] value)
Sets the value of a property.
|
java.lang.String |
toXml()
Returns the XML reprsentation of this object.
|
containsName, fromXml, getBigDecimal, getBigInteger, getBoolean, getDate, getDouble, getInteger, getLong, getLongArray, getObject, getString, getStringArray, getXmlArchivedProperties, getXmlArchivedPropertiesArray, propertyNameSet, remove, size, toString, toXml
public MutableProperties()
public MutableProperties(XmlArchivedProperties p)
p
- the map of properties to be copied overpublic MutableProperties(java.lang.String xml)
xml
- the XML representation of the mapjava.lang.IllegalArgumentException
- if the given XML document is
null or emptypublic java.lang.String toXml()
public MutableProperties getMutableProperties(java.lang.String name)
MutableProperties
object. If the value is an instance of
XmlArchivedProperties
but not MutableProperties
,
a wrapper instance is created, inserted into this map and returned.name
- the property namenull
if the property does not exist, or if the property value
is null
java.lang.ClassCastException
- if the property value is not an
XmlArchivedProperties
objectpublic void setBigDecimal(java.lang.String name, java.math.BigDecimal value)
XmlArchivedProperties
setBigDecimal
in class XmlArchivedProperties
name
- the property namevalue
- the property valuepublic void setBigInteger(java.lang.String name, java.math.BigInteger value)
XmlArchivedProperties
setBigInteger
in class XmlArchivedProperties
name
- the property namevalue
- the property valuepublic void setBoolean(java.lang.String name, boolean b)
XmlArchivedProperties
setBoolean
in class XmlArchivedProperties
name
- the property nameb
- the property valuepublic void setDate(java.lang.String name, java.util.Date date)
XmlArchivedProperties
setDate
in class XmlArchivedProperties
name
- the property namedate
- the property valuepublic void setDouble(java.lang.String name, java.lang.Double value)
XmlArchivedProperties
setDouble
in class XmlArchivedProperties
name
- the property namevalue
- the property valuepublic void setInteger(java.lang.String name, java.lang.Integer value)
XmlArchivedProperties
setInteger
in class XmlArchivedProperties
name
- the property namevalue
- the property valuepublic void setLong(java.lang.String name, java.lang.Long value)
XmlArchivedProperties
setLong
in class XmlArchivedProperties
name
- the property namevalue
- the property valuepublic void setLongArray(java.lang.String name, java.lang.Long[] value)
XmlArchivedProperties
setLongArray
in class XmlArchivedProperties
name
- the property namevalue
- the property valuepublic void setString(java.lang.String name, java.lang.String value)
XmlArchivedProperties
setString
in class XmlArchivedProperties
name
- the property namevalue
- the property valuepublic void setStringArray(java.lang.String name, java.lang.String[] value)
XmlArchivedProperties
setStringArray
in class XmlArchivedProperties
name
- the property namevalue
- the property valuepublic void setXmlArchivedProperties(java.lang.String name, XmlArchivedProperties value)
XmlArchivedProperties
setXmlArchivedProperties
in class XmlArchivedProperties
name
- the property namevalue
- the property valuepublic void setXmlArchivedPropertiesArray(java.lang.String name, XmlArchivedProperties[] value)
XmlArchivedProperties
setXmlArchivedPropertiesArray
in class XmlArchivedProperties
name
- the property namevalue
- the property value