Joda System API

org.joda.property.impl.collection
Class DefaultDataListProperty

java.lang.Object
  |
  +--org.joda.property.impl.AbstractModelElement
        |
        +--org.joda.property.impl.AbstractProperty
              |
              +--org.joda.property.impl.collection.AbstractListProperty
                    |
                    +--org.joda.property.impl.collection.DefaultDataListProperty
All Implemented Interfaces:
java.util.Collection, CollectionProperty, DataListProperty, InitializableProperty, java.util.List, ListProperty, ModelElement, Property, Property.Internal, java.io.Serializable

public class DefaultDataListProperty
extends AbstractListProperty
implements DataListProperty

Standard implementation of a list of objects.

Author:
Stephen Colebourne
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.joda.property.Property
Property.Internal
 
Constructor Summary
DefaultDataListProperty()
          Constructor
 
Method Summary
protected  java.lang.Object convertListObject(java.lang.Object object)
          Check whether the object is valid to add to the list.
protected  Property createClonedProperty(Bean bean)
          Create a clone of this property, ignoring the data contents
protected  void populateClonedProperty(IdentityBasedHashMap clonedObjects, Property property)
          Populate the clone of this property with the same data as this one
 java.lang.String toDataString(int index)
          Get the element at the specified index as a formal string
 java.lang.String toString()
          Get a debugging string of this object
 
Methods inherited from class org.joda.property.impl.collection.AbstractListProperty
add, add, addAll, addAll, clear, contains, containsAll, get, getContentName, getContentType, getInternal, getPropertyType, indexOf, initBeanCreated, initPropertyCreated, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, set, size, subList, toArray, toArray, toCollection, toList, toObject
 
Methods inherited from class org.joda.property.impl.AbstractProperty
addPropertyChangeListener, bean, checkArgumentNotNull, checkModifiable, checkValueNotNull, checkValueNotNull, cloneDeep, convertObject, data, equals, equalsValue, firePropertyChange, firePropertyChange, getPropertyName, getThis, hashCode, isModifiable, isNull, isReadOnly, removePropertyChangeListener, setModifiable, setReadOnly, toDataString
 
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.type.ListProperty
toList
 
Methods inherited from interface org.joda.property.type.CollectionProperty
toCollection
 
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
 
Methods inherited from interface org.joda.property.ModelElement
getAttribute, getAttributeCount, getAttributeMap, setAttribute
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

DefaultDataListProperty

public DefaultDataListProperty()
Constructor

Method Detail

convertListObject

protected java.lang.Object convertListObject(java.lang.Object object)
Check whether the object is valid to add to the list. This checks using the list value type.

Specified by:
convertListObject in class AbstractListProperty
Throws:
IllegalArgumentPropertyException - if the argument is unacceptable for adding to the list

toDataString

public java.lang.String toDataString(int index)
Description copied from interface: DataListProperty
Get the element at the specified index as a formal string

Specified by:
toDataString in interface DataListProperty
Parameters:
index - the element to obtain
Returns:
the element as a string
See Also:
DataListProperty.toDataString(int)

createClonedProperty

protected Property createClonedProperty(Bean bean)
Create a clone of this property, ignoring the data contents

Overrides:
createClonedProperty in class AbstractProperty
Parameters:
bean - the bean that owns the property

populateClonedProperty

protected void populateClonedProperty(IdentityBasedHashMap clonedObjects,
                                      Property property)
Populate the clone of this property with the same data as this one

Overrides:
populateClonedProperty in class AbstractProperty
Parameters:
clonedObjects - the map of original element to cloned element
property - the property to clone the data into

toString

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

Specified by:
toString in interface Property
Overrides:
toString in class AbstractListProperty
Returns:
debugging string

Joda System API

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