|
Joda System API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.joda.property.impl.AbstractModelElement
|
+--org.joda.property.impl.AbstractProperty
Standard implementation of the basic read only property.
| Nested Class Summary |
| Nested classes inherited from class org.joda.property.Property |
Property.Internal |
| Constructor Summary | |
protected |
AbstractProperty()
Constructor |
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a listener to the list of those receiving change events. |
Bean |
bean()
Get the bean which owns this property. |
protected void |
checkArgumentNotNull(java.lang.Object object)
Check whether the argument to a property method is null or not, throwing the appropriate exception if not. |
protected void |
checkModifiable()
Check whether the property is currently modifiable or not, throwing the appropriate exception if not. |
protected void |
checkValueNotNull()
Check whether the property is currently null or not, throwing the appropriate exception if not. |
protected void |
checkValueNotNull(java.lang.Object object)
Check whether the property is currently null or not, throwing the appropriate exception if not. |
void |
cloneDeep(IdentityBasedHashMap clonedObjects,
Bean bean)
Clone this property avoiding recursion. |
protected java.lang.Object |
convertObject(java.lang.Object object)
Convert an object, typically passed in as a parameter, to the underlying type for this property. |
protected Property |
createClonedProperty(Bean bean)
Create a clone of this property, ignoring the data contents |
PropertyData |
data()
Get the property data acting as the data store. |
boolean |
equals(java.lang.Object object)
Equals compares the Property to another property. |
boolean |
equalsValue(java.lang.Object object)
EqualsValue compares the value of the property to another object. |
void |
firePropertyChange(java.lang.Object oldValue,
java.lang.Object newValue)
Fire a value changed event for the property. |
protected void |
firePropertyChange(java.beans.PropertyChangeEvent ev)
|
java.lang.String |
getContentName()
Get the name of this property without the 'List' or 'Link' suffixes. |
java.lang.Class |
getContentType()
Get the type of the content of the property type. |
java.lang.String |
getPropertyName()
Get the name of this property. |
protected Property |
getThis()
Get 'this'. |
int |
hashCode()
Get the hashCode for the property in line with the spec. |
void |
initBeanCreated(PropertyInit init)
Initialize after the bean has been completed. |
void |
initPropertyCreated(PropertyInit init)
Initialize after the constructor. |
boolean |
isModifiable()
Get whether the property is currently modifiable or not. |
boolean |
isNull()
Test if the property currently set to null. |
boolean |
isReadOnly()
Get whether the property is never modifiable. |
protected void |
populateClonedProperty(IdentityBasedHashMap clonedObjects,
Property property)
Populate the clone of this property with the same data as this one |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove the specified listener from the list currently receiving change events. |
abstract void |
set(java.lang.Object propertyValue)
Set the property's value as an object. |
void |
setModifiable(boolean modifiable)
Set whether the property is currently modifiable or not. |
void |
setReadOnly()
Set the property as never modifiable. |
java.lang.String |
toDataString()
|
abstract java.lang.Object |
toObject()
Get the property's value as an object. |
java.lang.String |
toString()
Get a debug string for the property. |
| Methods inherited from class org.joda.property.impl.AbstractModelElement |
getAttribute, getAttributeCount, getAttributeMap, setAttribute |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.joda.property.Property |
getPropertyType |
| Methods inherited from interface org.joda.property.ModelElement |
getAttribute, getAttributeCount, getAttributeMap, setAttribute |
| Constructor Detail |
protected AbstractProperty()
| Method Detail |
public void initPropertyCreated(PropertyInit init)
initPropertyCreated in interface InitializablePropertypublic void initBeanCreated(PropertyInit init)
initBeanCreated in interface InitializablePropertypublic Bean bean()
bean in interface Propertypublic PropertyData data()
public abstract java.lang.Object toObject()
Property
This method has strong semantics such that where a and b are
properties of the same type, it must be true that:
b.set( a.toObject() );
a.equals(b);
In other words, the object contains all the data necessary to
recreate the property's value.
toObject in interface PropertyProperty.toObject()public java.lang.String toDataString()
DataProperty.toDataString()public boolean isNull()
Property
isNull in interface PropertyProperty.isNull()public abstract void set(java.lang.Object propertyValue)
PropertyIf a String is passed in, it can be parsed in various ways. If the results of toDataString() are passed in, it must reconstitute the original value.
set in interface PropertypropertyValue - an Object to set the property's value toProperty.set(Object)public boolean isReadOnly()
isReadOnly in interface Propertypublic void setReadOnly()
setReadOnly in interface Propertypublic boolean isModifiable()
isModifiable in interface Propertypublic void setModifiable(boolean modifiable)
setModifiable in interface Propertymodifiable - true if object should be modifiable
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Property
addPropertyChangeListener in interface Propertylistener - a listener to add to the listProperty.addPropertyChangeListener(PropertyChangeListener)public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Property
removePropertyChangeListener in interface Propertylistener - a listener to remove from the listProperty.removePropertyChangeListener(PropertyChangeListener)
public void firePropertyChange(java.lang.Object oldValue,
java.lang.Object newValue)
Property
firePropertyChange in interface PropertyProperty.firePropertyChange(Object,Object)protected void firePropertyChange(java.beans.PropertyChangeEvent ev)
Property.set(Object)public java.lang.String getPropertyName()
getPropertyName in interface Propertypublic java.lang.String getContentName()
getContentName in interface Propertypublic java.lang.Class getContentType()
getContentType in interface Property
public void cloneDeep(IdentityBasedHashMap clonedObjects,
Bean bean)
cloneDeep in interface Property.InternalclonedObjects - the map of original element to cloned elementbean - the bean that owns the propertyprotected Property createClonedProperty(Bean bean)
bean - the bean that owns the property
protected void populateClonedProperty(IdentityBasedHashMap clonedObjects,
Property property)
clonedObjects - the map of original element to cloned elementproperty - the property to clone the data intopublic java.lang.String toString()
toString in interface PropertytoString in class java.lang.Objectpublic final int hashCode()
hashCode in interface PropertyhashCode in class java.lang.ObjectObject.hashCode()public final boolean equals(java.lang.Object object)
equals in interface Propertyequals in class java.lang.Objectobject - the object to check against
public boolean equalsValue(java.lang.Object object)
NumericProperty.equalsValue will accept any Number
object, a String that can be parsed into a number or another property.
equalsValue in interface Propertyobject - the object to check against
protected void checkValueNotNull(java.lang.Object object)
protected void checkValueNotNull()
protected void checkModifiable()
protected void checkArgumentNotNull(java.lang.Object object)
protected java.lang.Object convertObject(java.lang.Object object)
object - input object
ConversionPropertyException - if the conversion failsprotected Property getThis()
|
Joda System API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||