net.sf.jasperreports.engine
Class JRPropertiesMap

java.lang.Object
  extended by net.sf.jasperreports.engine.JRPropertiesMap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class JRPropertiesMap
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Properties map of an JR element.

The order of the properties (obtained by getPropertyNames() is the same as the order in which the properties were added.

Version:
$Id: JRPropertiesMap.java 1997 2007-12-05 13:56:28Z teodord $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
Serialized Form

Constructor Summary
JRPropertiesMap()
          Creates a properties map.
JRPropertiesMap(JRPropertiesMap propertiesMap)
          Clones a properties map.
 
Method Summary
 java.lang.Object clone()
           
 JRPropertiesMap cloneProperties()
          Clones this property map.
 boolean containsProperty(java.lang.String propName)
          Decides whether the map contains a specified property.
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 hasProperties()
          Checks whether there are any properties.
 void removeProperty(java.lang.String propName)
          Removes a property.
 void setProperty(java.lang.String propName, java.lang.String value)
          Adds/sets a property value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JRPropertiesMap

public JRPropertiesMap()
Creates a properties map.


JRPropertiesMap

public JRPropertiesMap(JRPropertiesMap propertiesMap)
Clones a properties map.

Parameters:
propertiesMap - the original properties map
Method Detail

getPropertyNames

public java.lang.String[] getPropertyNames()
Returns the names of the properties.

Returns:
the names of the properties

getProperty

public java.lang.String getProperty(java.lang.String propName)
Returns the value of a property.

Parameters:
propName - the name of the property
Returns:
the value

containsProperty

public boolean containsProperty(java.lang.String propName)
Decides whether the map contains a specified property. The method returns true even if the property value is null.

Parameters:
propName - the property name
Returns:
true iff the map contains the property

setProperty

public void setProperty(java.lang.String propName,
                        java.lang.String value)
Adds/sets a property value.

Parameters:
propName - the name of the property
value - the value of the property

removeProperty

public void removeProperty(java.lang.String propName)
Removes a property.

Parameters:
propName - the property name

cloneProperties

public JRPropertiesMap cloneProperties()
Clones this property map.

Returns:
a clone of this property map

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hasProperties

public boolean hasProperties()
Checks whether there are any properties.

Returns:
whether there are any properties

getPropertiesClone

public static JRPropertiesMap getPropertiesClone(JRPropertiesHolder propertiesHolder)
Clones the properties map of a properties holder. If the holder does not have any properties, null is returned.

Parameters:
propertiesHolder - the properties holder
Returns:
a clone of the holder's properties map, or null if the holder does not have any properties


© 2001-2006 JasperSoft Corporation www.jaspersoft.com