public class JRPropertiesMap extends Object implements Serializable, Cloneable
getPropertyNames()
is the same as the order in which the properties were added.Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_VALUE |
Constructor and Description |
---|
JRPropertiesMap()
Creates a properties map.
|
JRPropertiesMap(JRPropertiesMap propertiesMap)
Clones a properties map.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
JRPropertiesMap |
cloneProperties()
Clones this property map.
|
protected void |
collectPropertyNames(Collection<String> names) |
boolean |
containsProperty(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 String |
getOwnProperty(String propName) |
String[] |
getOwnPropertyNames() |
static JRPropertiesMap |
getPropertiesClone(JRPropertiesHolder propertiesHolder)
Clones the properties map of a properties holder.
|
String |
getProperty(String propName)
Returns the value of a property.
|
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(String propName) |
boolean |
hasProperties()
Checks whether there are any properties.
|
boolean |
isEmpty() |
static JRPropertiesMap |
loadProperties(URL location)
Loads a properties file from a location.
|
void |
removeProperty(String propName)
Removes a property.
|
void |
setBaseProperties(JRPropertiesMap base)
Sets the base properties map.
|
void |
setProperty(String propName,
String value)
Adds/sets a property value.
|
String |
toString() |
public static final String PROPERTY_VALUE
public JRPropertiesMap()
public JRPropertiesMap(JRPropertiesMap propertiesMap)
propertiesMap
- the original properties mapprotected void ensureInit()
public String[] getPropertyNames()
public String[] getOwnPropertyNames()
protected void collectPropertyNames(Collection<String> names)
public String getProperty(String propName)
propName
- the name of the propertypublic boolean containsProperty(String propName)
propName
- the property nametrue
if and only if the map contains the propertyprotected boolean hasOwnProperty(String propName)
public void setProperty(String propName, String value)
propName
- the name of the propertyvalue
- the value of the propertypublic void removeProperty(String propName)
propName
- the property namepublic JRPropertiesMap cloneProperties()
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(URL location)
location
- the properties file URLprotected boolean hasEventSupport()
public JRPropertyChangeSupport getEventSupport()
Copyright © 2016. All rights reserved.