public class JRPropertiesMap
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
getPropertyNames()
is the same as the order in which the properties were added.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROPERTY_VALUE |
| Constructor and Description |
|---|
JRPropertiesMap()
Creates a properties map.
|
JRPropertiesMap(JRPropertiesMap propertiesMap)
Clones a properties map.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
JRPropertiesMap |
cloneProperties()
Clones this property map.
|
protected void |
collectPropertyNames(java.util.Collection<java.lang.String> names) |
boolean |
containsProperty(java.lang.String propName)
Decides whether the map contains a specified property.
|
protected void |
ensureInit() |
JRPropertiesMap |
getBaseProperties()
Returns the base properties map, if any.
|
JRPropertyChangeSupport |
getEventSupport() |
protected java.lang.String |
getOwnProperty(java.lang.String propName) |
static JRPropertiesMap |
getPropertiesClone(JRPropertiesHolder propertiesHolder)
Clones the properties map of a properties holder.
|
java.lang.String |
getProperty(java.lang.String propName)
Returns the value of a property.
|
java.lang.String[] |
getPropertyNames()
Returns the names of the properties.
|
boolean |
hasOwnProperties()
Checks whether this object has properties of its own
(i.e.
|
protected boolean |
hasOwnProperty(java.lang.String propName) |
boolean |
hasProperties()
Checks whether there are any properties.
|
static JRPropertiesMap |
loadProperties(java.net.URL location)
Loads a properties file from a location.
|
void |
removeProperty(java.lang.String propName)
Removes a property.
|
void |
setBaseProperties(JRPropertiesMap base)
Sets the base properties map.
|
void |
setProperty(java.lang.String propName,
java.lang.String value)
Adds/sets a property value.
|
java.lang.String |
toString() |
public static final java.lang.String PROPERTY_VALUE
public JRPropertiesMap()
public JRPropertiesMap(JRPropertiesMap propertiesMap)
propertiesMap - the original properties mapprotected void ensureInit()
public java.lang.String[] getPropertyNames()
protected void collectPropertyNames(java.util.Collection<java.lang.String> names)
public java.lang.String getProperty(java.lang.String propName)
propName - the name of the propertypublic boolean containsProperty(java.lang.String propName)
propName - the property nametrue if and only if the map contains the propertyprotected boolean hasOwnProperty(java.lang.String propName)
protected java.lang.String getOwnProperty(java.lang.String propName)
public void setProperty(java.lang.String propName,
java.lang.String value)
propName - the name of the propertyvalue - the value of the propertypublic void removeProperty(java.lang.String propName)
propName - the property namepublic JRPropertiesMap cloneProperties()
public java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean hasProperties()
public boolean hasOwnProperties()
setBaseProperties(JRPropertiesMap)public static JRPropertiesMap getPropertiesClone(JRPropertiesHolder propertiesHolder)
propertiesHolder - the properties holdernull
if the holder does not have any propertiespublic JRPropertiesMap getBaseProperties()
setBaseProperties(JRPropertiesMap)public void setBaseProperties(JRPropertiesMap base)
The base properties map are used as base/default properties for this
instance. All of the containsProperty(String),
getProperty(String), getPropertyNames() and
hasProperties() methods include base properties as well.
base - the base properties mappublic static JRPropertiesMap loadProperties(java.net.URL location)
location - the properties file URLpublic JRPropertyChangeSupport getEventSupport()
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com