|
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 | +--org.joda.property.impl.collection.AbstractMapProperty
Standard implementation of a map.
Nested Class Summary | |
class |
AbstractMapProperty.Entry
Inner class implementation of a Map entry suitable for adding to the map. |
Nested classes inherited from class org.joda.property.Property |
Property.Internal |
Constructor Summary | |
AbstractMapProperty()
Constructor |
Method Summary | |
void |
clear()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
protected java.lang.Object |
convertMapKeyObject(java.lang.Object object)
Check whether the key is valid to add to the map. |
protected abstract java.lang.Object |
convertMapValueObject(java.lang.Object object)
Check whether the object is valid to add to the map. |
java.util.Set |
entrySet()
|
java.lang.Object |
get(java.lang.Object key)
|
java.lang.String |
getContentName()
Get the name of each of the values in the map |
java.lang.Class |
getContentType()
Get the type of each of the values in the map |
protected java.util.Set |
getInternal()
Get the set backing the map |
java.lang.Class |
getMapKeyType()
Get the type of each of the keys in the map |
java.lang.Class |
getPropertyType()
Get the type of the property. |
void |
initBeanCreated(PropertyInit init)
Initialise the property after the bean is complete |
void |
initPropertyCreated(PropertyInit init)
Initialise the property after the constructor |
boolean |
isEmpty()
|
java.util.Set |
keySet()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
putAll(java.util.Map map)
|
java.lang.Object |
remove(java.lang.Object key)
|
void |
set(java.lang.Object propertyValue)
Set the property's value as an object. |
int |
size()
|
java.util.Map |
toMap()
Get the map underlying the property. |
java.lang.Object |
toObject()
Get the property's value as an object. |
java.util.Collection |
values()
|
Methods inherited from class org.joda.property.impl.AbstractProperty |
addPropertyChangeListener, bean, checkArgumentNotNull, checkModifiable, checkValueNotNull, checkValueNotNull, cloneDeep, convertObject, createClonedProperty, data, equals, equalsValue, firePropertyChange, firePropertyChange, getPropertyName, getThis, hashCode, isModifiable, isNull, isReadOnly, populateClonedProperty, removePropertyChangeListener, setModifiable, setReadOnly, toDataString, toString |
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 |
addPropertyChangeListener, bean, equals, equalsValue, firePropertyChange, getPropertyName, hashCode, isModifiable, isNull, isReadOnly, removePropertyChangeListener, setModifiable, setReadOnly, toString |
Methods inherited from interface org.joda.property.ModelElement |
getAttribute, getAttributeCount, getAttributeMap, setAttribute |
Methods inherited from interface java.util.Map |
equals, hashCode |
Constructor Detail |
public AbstractMapProperty()
Method Detail |
public void initPropertyCreated(PropertyInit init)
initPropertyCreated
in interface InitializableProperty
initPropertyCreated
in class AbstractProperty
public void initBeanCreated(PropertyInit init)
initBeanCreated
in interface InitializableProperty
initBeanCreated
in class AbstractProperty
public java.lang.Class getPropertyType()
getPropertyType
in interface Property
protected java.util.Set getInternal()
protected java.lang.Object convertMapKeyObject(java.lang.Object object)
IllegalArgumentPropertyException
- if the argument
is unacceptable for adding to the mapprotected abstract java.lang.Object convertMapValueObject(java.lang.Object object)
IllegalArgumentPropertyException
- if the argument
is unacceptable for adding to the mappublic java.lang.String getContentName()
getContentName
in interface Property
getContentName
in class AbstractProperty
public java.lang.Class getContentType()
getContentType
in interface Property
getContentType
in class AbstractProperty
public java.lang.Class getMapKeyType()
getMapKeyType
in interface MapProperty
public 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 Property
toObject
in class AbstractProperty
Property.toObject()
public java.util.Map toMap()
MapProperty
toMap
in interface MapProperty
MapProperty.toMap()
public void set(java.lang.Object propertyValue)
Property
If 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 Property
set
in class AbstractProperty
propertyValue
- an Object to set the property's value toProperty.set(Object)
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map
Map.get(Object)
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map
Map.put(Object, Object)
public void putAll(java.util.Map map)
putAll
in interface java.util.Map
Map.putAll(Map)
public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map
Map.remove(Object)
public void clear()
clear
in interface java.util.Map
Map.clear()
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map
Map.containsKey(Object)
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map
Map.containsValue(Object)
public java.util.Set entrySet()
entrySet
in interface java.util.Map
Map.entrySet()
public java.util.Set keySet()
keySet
in interface java.util.Map
Map.keySet()
public java.util.Collection values()
values
in interface java.util.Map
Map.values()
public boolean isEmpty()
isEmpty
in interface java.util.Map
Map.isEmpty()
public int size()
size
in interface java.util.Map
Map.size()
|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |