fr.inria.oadymppac.utils
Class DefaultProperties

java.lang.Object
  extended byfr.inria.oadymppac.utils.DefaultProperties
All Implemented Interfaces:
Properties

public class DefaultProperties
extends java.lang.Object
implements Properties

A property table reimplementation Basically support only String as Key Also use a HashTable => synchronized

Author:
raf

Field Summary
 
Fields inherited from interface fr.inria.oadymppac.utils.Properties
logger
 
Constructor Summary
DefaultProperties()
          Default Constructor
DefaultProperties(Properties properties)
          Build a new Property table using the given properties as parent table
 
Method Summary
 Properties getProperties()
          Return the property table
 java.lang.Object getProperty(java.lang.String property)
           
 void setProperties(Properties properties)
          Set the parent properties
 void setProperty(java.lang.String property, java.lang.Object value)
          Set a new value to a property If the property table does not exist, then it is created If the property was not previously defined, it is inserted into the table If the oproperty was already define, the current value is replaced by the new one.
 java.lang.String toString()
          Display the contnet of the property table and recursively from its parent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultProperties

public DefaultProperties()
Default Constructor


DefaultProperties

public DefaultProperties(Properties properties)
Build a new Property table using the given properties as parent table

Parameters:
properties - the parent propety table
Method Detail

setProperty

public void setProperty(java.lang.String property,
                        java.lang.Object value)
Set a new value to a property If the property table does not exist, then it is created If the property was not previously defined, it is inserted into the table If the oproperty was already define, the current value is replaced by the new one.

Specified by:
setProperty in interface Properties
See Also:
Properties.setProperty(java.lang.String, java.lang.Object)

getProperty

public java.lang.Object getProperty(java.lang.String property)
Specified by:
getProperty in interface Properties
Parameters:
property - the property name
Returns:
the property defined for the key If the property cannot be found, then look for thisproperty in the parent table (if any)
See Also:
Properties.getProperty(java.lang.String)

getProperties

public Properties getProperties()
Return the property table

Specified by:
getProperties in interface Properties
See Also:
Properties.getProperties()

setProperties

public void setProperties(Properties properties)
Set the parent properties

Specified by:
setProperties in interface Properties
See Also:
Properties.setProperties(fr.inria.oadymppac.utils.Properties)

toString

public java.lang.String toString()
Display the contnet of the property table and recursively from its parent

See Also:
Object.toString()