Class JRPropertiesMap

    • 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

      • ensureInit

        protected void ensureInit()
      • getPropertyNames

        public String[] getPropertyNames()
        Returns the names of the properties.
        Returns:
        the names of the properties
      • getOwnPropertyNames

        public String[] getOwnPropertyNames()
      • collectPropertyNames

        protected void collectPropertyNames​(Collection<String> names)
      • getProperty

        public String getProperty​(String propName)
        Returns the value of a property.
        Parameters:
        propName - the name of the property
        Returns:
        the value
      • containsProperty

        public boolean containsProperty​(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 if and only if the map contains the property
      • hasOwnProperty

        protected boolean hasOwnProperty​(String propName)
      • getOwnProperty

        protected String getOwnProperty​(String propName)
      • setProperty

        public void setProperty​(String propName,
                                String value)
        Adds/sets a property value.
        Parameters:
        propName - the name of the property
        value - the value of the property
      • removeProperty

        public void removeProperty​(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
      • copyOwnProperties

        public void copyOwnProperties​(JRPropertiesMap propertiesMap)
        Copies own properties of a different map into this object.
        Parameters:
        propertiesMap - the map to copy properties from
      • copyProperties

        public void copyProperties​(JRPropertiesMap propertiesMap)
        Copies properties of a different map into this object.
        Parameters:
        propertiesMap - the map to copy properties from
      • hasProperties

        public boolean hasProperties()
        Checks whether there are any properties.
        Returns:
        whether there are any properties
      • isEmpty

        public boolean isEmpty()
      • hasOwnProperties

        public boolean hasOwnProperties()
        Checks whether this object has properties of its own (i.e. not inherited from the base properties).
        Returns:
        whether this object has properties of its own
        See Also:
        setBaseProperties(JRPropertiesMap)
      • 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
      • loadProperties

        public static JRPropertiesMap loadProperties​(URL location)
        Loads a properties file from a location.
        Parameters:
        location - the properties file URL
        Returns:
        the properties file loaded as a in-memory properties map
      • hasEventSupport

        protected boolean hasEventSupport()