org.apache.beehive.controls.api.properties
Class BeanPropertyMap

Object
  extended by BaseMap
      extended by BeanPropertyMap
All Implemented Interfaces:
Serializable, PropertyMap

public class BeanPropertyMap
extends BaseMap
implements PropertyMap, Serializable

The BeanPropertyMap class represents a collection of property values where properties are stored in a local HashMap.

See Also:
Serialized Form

Constructor Summary
BeanPropertyMap(Class mapClass)
          Creates an empty BeanPropertyMap associated with the specific Control public interface, PropertySet, or annotation type.
BeanPropertyMap(PropertyMap map)
          Creates a BeanPropertyMap that wraps another PropertyMap.
BeanPropertyMap(T annot)
          Creates a BeanPropertyMap where default values are derived from a single annotation type instance.
 
Method Summary
 boolean containsPropertySet(Class<? extends Annotation> propertySet)
          Returns true if the PropertyMap contains one or more values for the specified PropertySet, false otherwise
 Object getProperty(PropertyKey key)
          Returns the property value specified by 'key' within this map.
 Set<PropertyKey> getPropertyKeys()
          Returns the set of PropertyKeys that are locally set in this property map.
 void setProperty(PropertyKey key, Object value)
          Sets the property specifed by 'key' within this map.
 
Methods inherited from class BaseMap
getDelegateMap, getMapClass, getPropertySet, isValidKey, setDelegateMap, setMapClass
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface PropertyMap
getDelegateMap, getMapClass, getPropertySet, setDelegateMap
 

Constructor Detail

BeanPropertyMap

public BeanPropertyMap(Class mapClass)
Creates an empty BeanPropertyMap associated with the specific Control public interface, PropertySet, or annotation type.


BeanPropertyMap

public BeanPropertyMap(PropertyMap map)
Creates a BeanPropertyMap that wraps another PropertyMap. Any changes via setProperty will be maintained locally on the constructed map, but getProperty will delegate to the base PropertyMap for properties not set locally.


BeanPropertyMap

public BeanPropertyMap(T annot)
Creates a BeanPropertyMap where default values are derived from a single annotation type instance. This can be used to create a map from a property getter return value, to modify element values.

Method Detail

setProperty

public void setProperty(PropertyKey key,
                        Object value)
Sets the property specifed by 'key' within this map.

Specified by:
setProperty in interface PropertyMap

getProperty

public Object getProperty(PropertyKey key)
Returns the property value specified by 'key' within this map.

Specified by:
getProperty in interface PropertyMap
Overrides:
getProperty in class BaseMap

containsPropertySet

public boolean containsPropertySet(Class<? extends Annotation> propertySet)
Returns true if the PropertyMap contains one or more values for the specified PropertySet, false otherwise

Specified by:
containsPropertySet in interface PropertyMap
Overrides:
containsPropertySet in class BaseMap

getPropertyKeys

public Set<PropertyKey> getPropertyKeys()
Returns the set of PropertyKeys that are locally set in this property map. Note: this does not include any properties that might be set as a result of property lookup delegation.