Joda System API

org.joda.property.impl.collection
Class DefaultDataMapProperty

java.lang.Object
  |
  +--org.joda.property.impl.AbstractModelElement
        |
        +--org.joda.property.impl.AbstractProperty
              |
              +--org.joda.property.impl.collection.AbstractMapProperty
                    |
                    +--org.joda.property.impl.collection.DefaultDataMapProperty
All Implemented Interfaces:
DataMapProperty, InitializableProperty, java.util.Map, MapProperty, ModelElement, Property, Property.Internal, java.io.Serializable

public class DefaultDataMapProperty
extends AbstractMapProperty
implements DataMapProperty

Standard implementation of a map of objects.

Author:
Stephen Colebourne
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.joda.property.impl.collection.AbstractMapProperty
AbstractMapProperty.Entry
 
Nested classes inherited from class org.joda.property.Property
Property.Internal
 
Constructor Summary
DefaultDataMapProperty()
          Constructor
 
Method Summary
protected  java.lang.Object convertMapValueObject(java.lang.Object object)
          Check whether the object is valid to add to the map.
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(java.lang.Object key)
          Get an object from the Map as a formal data string.
 java.lang.String toString()
          Get a debugging string of this object
 
Methods inherited from class org.joda.property.impl.collection.AbstractMapProperty
clear, containsKey, containsValue, convertMapKeyObject, entrySet, get, getContentName, getContentType, getInternal, getMapKeyType, getPropertyType, initBeanCreated, initPropertyCreated, isEmpty, keySet, put, putAll, remove, set, size, toMap, toObject, values
 
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.MapProperty
getMapKeyType, toMap
 
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.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

DefaultDataMapProperty

public DefaultDataMapProperty()
Constructor

Method Detail

convertMapValueObject

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

Specified by:
convertMapValueObject in class AbstractMapProperty
Throws:
IllegalArgumentPropertyException - if the argument is unacceptable for adding to the map

toDataString

public java.lang.String toDataString(java.lang.Object key)
Get an object from the Map as a formal data string.

Specified by:
toDataString in interface DataMapProperty
Parameters:
key - the key to obtain
Returns:
a string representing the data value

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 AbstractProperty
Returns:
debugging string

Joda System API

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