com.irisel.util
Class ConfigurationProperties

java.lang.Object
  extended by com.irisel.util.ConfigurationProperties
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

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

See Also:
Serialized Form

Constructor Summary
ConfigurationProperties()
          Default constructor.
ConfigurationProperties(ConfigurationProperties props)
          Copy constructor.
 
Method Summary
 void clear()
          Removes all properties stored in this collection.
 java.lang.Object clone()
          Clones the properties.
 boolean containsKey(java.lang.String key)
          Checks whether the given key is stored in this collection of ReportProperties.
 boolean containsMarkedProperties()
          Returns true, if there is at least one marked property.
 java.lang.Object get(java.lang.String key)
          Retrieves the value stored for a key in this properties collection.
 java.lang.Object get(java.lang.String key, java.lang.Object defaultValue)
          Retrieves the value stored for a key in this properties collection, and returning the default value if the key was not stored in this properties collection.
 boolean isMarked(java.lang.String property)
          Returns true if the specified property is marked, and false otherwise.
 java.util.Iterator keys()
          Returns all property keys as enumeration.
 void put(java.lang.String key, java.lang.Object value)
          Adds a property to this properties collection.
 void setMarked(java.lang.String property, boolean marked)
          Marks a property.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationProperties

public ConfigurationProperties(ConfigurationProperties props)
Copy constructor.

Parameters:
props - an existing ReportProperties instance.

ConfigurationProperties

public ConfigurationProperties()
Default constructor.

Method Detail

put

public void put(java.lang.String key,
                java.lang.Object value)
Adds a property to this properties collection. If a property with the given name exist, the property will be replaced with the new value. If the value is null, the property will be removed.

Parameters:
key - the property key.
value - the property value.

get

public java.lang.Object get(java.lang.String key)
Retrieves the value stored for a key in this properties collection.

Parameters:
key - the property key.
Returns:
The stored value, or null if the key does not exist in this collection.

get

public java.lang.Object get(java.lang.String key,
                            java.lang.Object defaultValue)
Retrieves the value stored for a key in this properties collection, and returning the default value if the key was not stored in this properties collection.

Parameters:
key - the property key.
defaultValue - the default value to be returned when the key is not stored in this properties collection.
Returns:
The stored value, or the default value if the key does not exist in this collection.

keys

public java.util.Iterator keys()
Returns all property keys as enumeration.

Returns:
an enumeration of the property keys.

clear

public void clear()
Removes all properties stored in this collection.


containsKey

public boolean containsKey(java.lang.String key)
Checks whether the given key is stored in this collection of ReportProperties.

Parameters:
key - the property key.
Returns:
true, if the given key is known.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones the properties.

Overrides:
clone in class java.lang.Object
Returns:
a copy of this ReportProperties object.
Throws:
java.lang.CloneNotSupportedException - this should never happen.

setMarked

public void setMarked(java.lang.String property,
                      boolean marked)
Marks a property.

Parameters:
property - the property key.
marked - boolean.

isMarked

public boolean isMarked(java.lang.String property)
Returns true if the specified property is marked, and false otherwise.

Parameters:
property - the property key.
Returns:
true for marked properties, false otherwise.

containsMarkedProperties

public boolean containsMarkedProperties()
Returns true, if there is at least one marked property.

Returns:
true, if there are some properties marked, false otherwise.