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) |
java.lang.String[] |
getOwnPropertyNames() |
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.
|
protected boolean |
hasEventSupport() |
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.
|
boolean |
isEmpty() |
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()
public java.lang.String[] getOwnPropertyNames()
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.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean hasProperties()
public boolean isEmpty()
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 URLprotected boolean hasEventSupport()
public JRPropertyChangeSupport getEventSupport()
© 2001-2014 TIBCO Software Inc. www.jaspersoft.com