public class JCSMPPropertyMap extends Object implements Serializable, Cloneable
Constructor and Description |
---|
JCSMPPropertyMap() |
Modifier and Type | Method and Description |
---|---|
Boolean |
getBooleanProperty(String name)
Searches for the property with the specified key in the property list and
converts to Boolean.
|
Integer |
getIntegerProperty(String name)
Searches for the property with the specified key in the property list and
converts to Integer.
|
Map<String,Object> |
getProperties()
Returns the property map.
|
Object |
getProperty(String name)
Searches for the property with the specified key in the property list.
|
String |
getStringProperty(String name)
Searches for the property with the specified key in the property list and
converts to String.
|
Set<String> |
propertyNames()
Gets the set of property names (keys) currently in the property map.
|
Object |
setBooleanProperty(String name,
boolean value)
Sets a property with the specified key and value in the property list,
wrapping the value as a Boolean.
|
Object |
setIntegerProperty(String name,
int value)
Sets a property with the specified key and value in the property list,
wrapping the value as an Integer.
|
void |
setProperties(Map<String,Object> properties)
Bulk set of properties, invokes the
HashMap.putAll(Map) method which copies
entries from the provided map to the property map. |
Object |
setProperty(String name,
Object value)
Sets a property with the specified key and value in the property list.
|
public Object getProperty(String name)
null
if the property is not found or the key
explicitly maps to null
.name
- The name of the property.public Map<String,Object> getProperties()
public Object setProperty(String name, Object value)
put
operation to the property
map. Property values should match the expected type listed, such as
Integer and Boolean properties.name
- The name of the property.value
- The value of the property.put
operation.public void setProperties(Map<String,Object> properties)
HashMap.putAll(Map)
method which copies
entries from the provided map to the property map. This
overwrites existing properties with the same names.properties
- The map from which to copy properties.public Integer getIntegerProperty(String name)
null
if the property is not
found, was not an Integer, or the key explicitly maps to null
.name
- The name of the property.null
.public Boolean getBooleanProperty(String name)
null
if the property
is not found, was not a Boolean, or the key explicitly maps to
null
.name
- The name of the property.null
if the
property is not found, was not a Boolean, or the key explicitly
maps to null
).public String getStringProperty(String name)
null
if the property is not found,
was not a String, or the key explicitly maps to null
.name
- The name of the property.null
.public Object setIntegerProperty(String name, int value)
name
- The name of the property.value
- The value of the property.public Object setBooleanProperty(String name, boolean value)
name
- The name of the property.value
- The value of the property.Copyright 2004-2024 Solace Corporation. All rights reserved.