Class DelegatingMapProperty<S,K,V>
java.lang.Object
org.eclipse.core.databinding.property.map.MapProperty<S,K,V>
org.eclipse.core.databinding.property.map.DelegatingMapProperty<S,K,V>
- Type Parameters:
S
- type of the source objectK
- type of the keys to the mapV
- type of the values in the map
- All Implemented Interfaces:
IProperty
,IMapProperty<S,
K, V>
- Since:
- 1.2
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
DelegatingMapProperty
(Object keyType, Object valueType) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract IMapProperty<S,
K, V> doGetDelegate
(S source) Returns the property to delegate to for the specified source object.Returns a Map with the current contents of the source's map propertyprotected void
Updates the property on the source with the specified change.protected void
doUpdateMap
(S source, MapDiff<K, V> diff) Updates the property on the source with the specified change.final IMapProperty<S,
K, V> getDelegate
(S source) Returns the property to delegate to for the specified source object.Returns the element type of the map's key set ornull
if the key set is untyped.Returns the element type of the map's values collection ornull
if the collection is untyped.Returns an observable map observing this map property on the given property sourceReturns an observable map observing this map property on the given property sourceMethods inherited from class org.eclipse.core.databinding.property.map.MapProperty
getMap, mapFactory, mapFactory, observeDetail, setMap, updateMap, values
-
Constructor Details
-
DelegatingMapProperty
protected DelegatingMapProperty() -
DelegatingMapProperty
-
-
Method Details
-
getDelegate
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
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
Description copied from interface:IMapProperty
Returns the element type of the map's key set ornull
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
Description copied from interface:IMapProperty
Returns the element type of the map's values collection ornull
if the collection is untyped.- Returns:
- the element type of the map's values collection or
null
if the collection is untyped.
-
doGetMap
Description copied from class:MapProperty
Returns a Map with the current contents of the source's map property- Overrides:
doGetMap
in classMapProperty<S,
K, V> - Parameters:
source
- the property source- Returns:
- a Map with the current contents of the source's map property
-
doSetMap
Description copied from class:MapProperty
Updates the property on the source with the specified change.- Overrides:
doSetMap
in classMapProperty<S,
K, V> - Parameters:
source
- the property sourcemap
- the new map
-
doUpdateMap
Description copied from class:MapProperty
Updates the property on the source with the specified change.- Overrides:
doUpdateMap
in classMapProperty<S,
K, V> - Parameters:
source
- the property sourcediff
- a diff describing the change
-
observe
Description copied from interface:IMapProperty
Returns an observable map observing this map property on the given property source- Specified by:
observe
in interfaceIMapProperty<S,
K, V> - Overrides:
observe
in classMapProperty<S,
K, V> - Parameters:
source
- the property source- Returns:
- an observable map observing this map-typed property on the given property source
-
observe
Description copied from interface:IMapProperty
Returns an observable map observing this map property on the given property source- Parameters:
realm
- the observable's realmsource
- the property source- Returns:
- an observable map observing this map-typed property on the given property source
-