Joda System API

org.joda.property.impl
Interface PropertyData

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AbstractPropertyData

public interface PropertyData
extends java.io.Serializable

PropertyData defines the storage mechanism for a property. The default implementation is to store data as an attribute, however alternative implementations that use reflection or derive the value from other properties are possible.

Author:
Stephen Colebourne

Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a listener to the list of those receiving change events.
 boolean equals(java.lang.Object anotherObject)
          Is this property data equal to another.
 void firePropertyChange(java.beans.PropertyChangeEvent event)
          Fire a value changed event for the property.
 java.lang.Object get()
          Get the value of the property.
 int hashCode()
          Get the hashCode for the data.
 boolean isModifiable()
          Is the property currently modifiable.
 boolean isReadOnly()
          Is the property permanently unmodifiable.
 Property property()
          Get the property this data belongs to.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove the specified listener from the list currently receiving change events.
 void set(java.lang.Object value)
          Set the value of the property.
 void setModifiable(boolean modifiable)
          Set the flag to indicate if the object is currently modifiable.
 void setReadOnly()
          Set the property permanently unmodifiable.
 java.lang.String toString()
          Get a debugging string.
 

Method Detail

property

public Property property()
Get the property this data belongs to.

Returns:
the owning property

get

public java.lang.Object get()
Get the value of the property. The object type will be appropriate for the type of property.

Returns:
the Object previously stored by a set(Object)

set

public void set(java.lang.Object value)
Set the value of the property. The object type should be appropriate for the type of property.

Parameters:
value - an Object to store

isModifiable

public boolean isModifiable()
Is the property currently modifiable.

Returns:
true if the property value can currently be changed

setModifiable

public void setModifiable(boolean modifiable)
Set the flag to indicate if the object is currently modifiable.

Parameters:
modifiable - true if object should be modifiable

isReadOnly

public boolean isReadOnly()
Is the property permanently unmodifiable.

Returns:
true if the property value can never be modified

setReadOnly

public void setReadOnly()
Set the property permanently unmodifiable.


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a listener to the list of those receiving change events. No action occurs if null is passed in.

Parameters:
listener - a listener to add to the list

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove the specified listener from the list currently receiving change events. No action occurs if the listener is not in the list.

Parameters:
listener - a listener to remove from the list

firePropertyChange

public void firePropertyChange(java.beans.PropertyChangeEvent event)
Fire a value changed event for the property. This method is rarely called by applications.

Parameters:
event - the event to send

equals

public boolean equals(java.lang.Object anotherObject)
Is this property data equal to another.

Overrides:
equals in class java.lang.Object
Parameters:
anotherObject - another object to compare this one to
Returns:
true if the properties are equal

hashCode

public int hashCode()
Get the hashCode for the data.

Overrides:
hashCode in class java.lang.Object
Returns:
hashCode

toString

public java.lang.String toString()
Get a debugging string.

Overrides:
toString in class java.lang.Object
Returns:
debugging string

Joda System API

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