Joda System API

org.joda.property.impl.data
Class ModifiablePropertyData

java.lang.Object
  |
  +--org.joda.property.impl.data.AbstractPropertyData
        |
        +--org.joda.property.impl.data.DefaultPropertyData
              |
              +--org.joda.property.impl.data.ModifiablePropertyData
All Implemented Interfaces:
InitializablePropertyData, PropertyData, java.io.Serializable

public abstract class ModifiablePropertyData
extends DefaultPropertyData

Derived property data implementation for modifiable data.

Subclasses will typically derive their data from other properties on the parent Property. To fire the correct events when those properties change, call addDependentOn() from the initParentCreated() method.

Author:
Stephen Colebourne
See Also:
Serialized Form

Constructor Summary
ModifiablePropertyData()
          Constructor
 
Method Summary
 void addDependentOn(Property property)
          Add a property that this property is dependent on.
abstract  java.lang.Object get()
          Get the value of the property.
 void set(java.lang.Object object)
          Set the value of the property.
abstract  void setObject(java.lang.Object object)
          Set the value of the property.
 
Methods inherited from class org.joda.property.impl.data.DefaultPropertyData
isModifiable, isReadOnly, setModifiable, setReadOnly
 
Methods inherited from class org.joda.property.impl.data.AbstractPropertyData
addPropertyChangeListener, bean, firePropertyChange, firePropertyChange, initPropertyDataCreated, property, removePropertyChangeListener, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.joda.property.impl.PropertyData
equals, hashCode
 

Constructor Detail

ModifiablePropertyData

public ModifiablePropertyData()
Constructor

Method Detail

addDependentOn

public void addDependentOn(Property property)
Add a property that this property is dependent on. This should be called from initBeanCreated(), not initPropertyCreated().

Parameters:
property - the property that this depends on

get

public abstract java.lang.Object get()
Get the value of the property.

Specified by:
get in interface PropertyData
Overrides:
get in class DefaultPropertyData
Returns:
the object value of the property
See Also:
PropertyData#get()

set

public final void set(java.lang.Object object)
Description copied from interface: PropertyData
Set the value of the property. The object type should be appropriate for the type of property.

Specified by:
set in interface PropertyData
Overrides:
set in class DefaultPropertyData
See Also:
PropertyData.set(Object)

setObject

public abstract void setObject(java.lang.Object object)
Set the value of the property.

Parameters:
object - the object to store

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.