net.infonode.properties.propertymap
Class PropertyMapValueHandler

java.lang.Object
  extended by net.infonode.properties.propertymap.PropertyMapValueHandler
All Implemented Interfaces:
PropertyValueHandler

public class PropertyMapValueHandler
extends java.lang.Object
implements PropertyValueHandler

Property value handler for property maps.

Version:
$Revision: 1.3 $
Author:
$Author: jesper $

Field Summary
static PropertyMapValueHandler INSTANCE
          The instance of this class.
 
Constructor Summary
private PropertyMapValueHandler()
          Constructor
 
Method Summary
 java.lang.Object getValue(Property property, java.lang.Object object)
          Gets the value of a property from a value container.
 boolean getValueIsRemovable(Property property, java.lang.Object object)
          Returns true if the property value is removable from the value container.
 boolean getValueIsSet(Property property, java.lang.Object object)
          Returns true if a value for the property is set in the value container.
 void removeValue(Property property, java.lang.Object object)
          Removes a property value from a value container.
 void setValue(Property property, java.lang.Object object, java.lang.Object value)
          Sets the value of a property in a value container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final PropertyMapValueHandler INSTANCE
The instance of this class.

Constructor Detail

PropertyMapValueHandler

private PropertyMapValueHandler()
Constructor

Method Detail

getValue

public java.lang.Object getValue(Property property,
                                 java.lang.Object object)
Description copied from interface: PropertyValueHandler
Gets the value of a property from a value container.

Specified by:
getValue in interface PropertyValueHandler
Parameters:
property - the property
object - the object containing the value
Returns:
the property value, null if the container doesn't contain the value

setValue

public void setValue(Property property,
                     java.lang.Object object,
                     java.lang.Object value)
Description copied from interface: PropertyValueHandler
Sets the value of a property in a value container.

Specified by:
setValue in interface PropertyValueHandler
Parameters:
property - the property
object - the object that will contain the value
value - the property value

getValueIsRemovable

public boolean getValueIsRemovable(Property property,
                                   java.lang.Object object)
Description copied from interface: PropertyValueHandler
Returns true if the property value is removable from the value container.

Specified by:
getValueIsRemovable in interface PropertyValueHandler
Parameters:
property - the property
object - the value container
Returns:
true if the property value is removable from the value container

removeValue

public void removeValue(Property property,
                        java.lang.Object object)
Description copied from interface: PropertyValueHandler
Removes a property value from a value container.

Specified by:
removeValue in interface PropertyValueHandler
Parameters:
property - the property
object - the value container

getValueIsSet

public boolean getValueIsSet(Property property,
                             java.lang.Object object)
Description copied from interface: PropertyValueHandler
Returns true if a value for the property is set in the value container.

Specified by:
getValueIsSet in interface PropertyValueHandler
Parameters:
property - the property
object - the value container
Returns:
true if a value for the property is set in the value container