Joda System API

org.joda.property.type
Interface DataProperty

All Superinterfaces:
ModelElement, Property, java.io.Serializable
All Known Subinterfaces:
BooleanicProperty, BooleanPrimitiveProperty, BooleanProperty, ClassProperty, DateProperty, DateTimeProperty, DecimalProperty, DoublePrimitiveProperty, DoubleProperty, InstantProperty, IntegerPrimitiveProperty, IntegerProperty, LocaleProperty, LongPrimitiveProperty, LongProperty, NumericProperty, ObjectProperty, StringProperty, TimeProperty
All Known Implementing Classes:
AbstractBooleanicProperty, AbstractNumericProperty, DefaultBooleanPrimitiveProperty, DefaultBooleanProperty, DefaultClassProperty, DefaultDateProperty, DefaultDateTimeProperty, DefaultDecimalProperty, DefaultDoublePrimitiveProperty, DefaultDoubleProperty, DefaultIntegerPrimitiveProperty, DefaultIntegerProperty, DefaultLocaleProperty, DefaultLongPrimitiveProperty, DefaultLongProperty, DefaultObjectProperty, DefaultStringProperty, DefaultTimeProperty

public interface DataProperty
extends Property

A DataProperty is a property which can express all of its data in a single formalised String.

Author:
Stephen Colebourne

Nested Class Summary
 
Nested classes inherited from class org.joda.property.Property
Property.Internal
 
Method Summary
 java.lang.String toDataString()
          Get the property's value as a string.
 
Methods inherited from interface org.joda.property.Property
addPropertyChangeListener, bean, equals, equalsValue, firePropertyChange, getContentName, getContentType, getPropertyName, getPropertyType, hashCode, isModifiable, isNull, isReadOnly, removePropertyChangeListener, set, setModifiable, setReadOnly, toObject, toString
 
Methods inherited from interface org.joda.property.ModelElement
getAttribute, getAttributeCount, getAttributeMap, setAttribute
 

Method Detail

toDataString

public java.lang.String toDataString()
Get the property's value as a string. The String should consist of all the data of the property's value in a form that can be interpretted by the set(String) method. If toObject() returns null, then toDataString() should also return null.

This method has stronger semantics than an ordinary toString(). Where a and b are properties of the same type, it must be true that:
b.set( a.toDataString() ); a.equals(b);
In other words, the string contains all the data necessary to recreate the property's value.

Where possible, the string returned should be the same as that returned by calling toString() on the underlying object.

Returns:
a String representing the property's value

Joda System API

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