Eclipse Platform
Release 3.6

org.eclipse.core.databinding.property.map
Class DelegatingMapProperty

java.lang.Object
  extended by org.eclipse.core.databinding.property.map.MapProperty
      extended by org.eclipse.core.databinding.property.map.DelegatingMapProperty
All Implemented Interfaces:
IProperty, IMapProperty

public abstract class DelegatingMapProperty
extends MapProperty

Since:
1.2

Constructor Summary
protected DelegatingMapProperty()
           
protected DelegatingMapProperty(Object keyType, Object valueType)
           
 
Method Summary
protected abstract  IMapProperty doGetDelegate(Object source)
          Returns the property to delegate to for the specified source object.
protected  Map doGetMap(Object source)
          Returns a Map with the current contents of the source's map property
protected  void doSetMap(Object source, Map map)
          Updates the property on the source with the specified change.
protected  void doUpdateMap(Object source, MapDiff diff)
          Updates the property on the source with the specified change.
 IMapProperty getDelegate(Object source)
          Returns the property to delegate to for the specified source object.
 Object getKeyType()
          Returns the element type of the map's key set or null if the key set is untyped.
 Object getValueType()
          Returns the element type of the map's values collection or null if the collection is untyped.
 IObservableMap observe(Object source)
          Returns an observable map observing this map property on the given property source
 IObservableMap observe(Realm realm, Object source)
          Returns an observable map observing this map property on the given property source
 
Methods inherited from class org.eclipse.core.databinding.property.map.MapProperty
getMap, mapFactory, mapFactory, observeDetail, setMap, updateMap, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingMapProperty

protected DelegatingMapProperty()

DelegatingMapProperty

protected DelegatingMapProperty(Object keyType,
                                Object valueType)
Method Detail

getDelegate

public final IMapProperty getDelegate(Object source)
Returns the property to delegate to for the specified source object. Repeated calls to this method with the same source object returns the same delegate instance.

Parameters:
source - the property source (may be null)
Returns:
the property to delegate to for the specified source object.

doGetDelegate

protected abstract IMapProperty doGetDelegate(Object source)
Returns the property to delegate to for the specified source object. Implementers must ensure that repeated calls to this method with the same source object returns the same delegate instance.

Parameters:
source - the property source
Returns:
the property to delegate to for the specified source object.

getKeyType

public Object getKeyType()
Description copied from interface: IMapProperty
Returns the element type of the map's key set or null if the key set is untyped.

Returns:
the element type of the map's key set or null if the key set is untyped.

getValueType

public Object getValueType()
Description copied from interface: IMapProperty
Returns the element type of the map's values collection or null if the collection is untyped.

Returns:
the element type of the map's values collection or null if the collection is untyped.

doGetMap

protected Map doGetMap(Object source)
Description copied from class: MapProperty
Returns a Map with the current contents of the source's map property

Overrides:
doGetMap in class MapProperty
Parameters:
source - the property source
Returns:
a Map with the current contents of the source's map property

doSetMap

protected void doSetMap(Object source,
                        Map map)
Description copied from class: MapProperty
Updates the property on the source with the specified change.

Overrides:
doSetMap in class MapProperty
Parameters:
source - the property source
map - the new map

doUpdateMap

protected void doUpdateMap(Object source,
                           MapDiff diff)
Description copied from class: MapProperty
Updates the property on the source with the specified change.

Overrides:
doUpdateMap in class MapProperty
Parameters:
source - the property source
diff - a diff describing the change

observe

public IObservableMap observe(Object source)
Description copied from interface: IMapProperty
Returns an observable map observing this map property on the given property source

Specified by:
observe in interface IMapProperty
Overrides:
observe in class MapProperty
Parameters:
source - the property source
Returns:
an observable map observing this map-typed property on the given property source

observe

public IObservableMap observe(Realm realm,
                              Object source)
Description copied from interface: IMapProperty
Returns an observable map observing this map property on the given property source

Parameters:
realm - the observable's realm
source - the property source
Returns:
an observable map observing this map-typed property on the given property source

Eclipse Platform
Release 3.6

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.