Eclipse Platform
Release 3.6

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

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

public abstract class MapProperty
extends Object
implements IMapProperty

Abstract implementation of IMapProperty

Since:
1.2

Constructor Summary
MapProperty()
           
 
Method Summary
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.
 Map getMap(Object source)
          Returns an unmodifiable Map with the current contents of the source's map property.
 IObservableFactory mapFactory()
          Returns a factory for creating observable maps tracking this property of a particular property source.
 IObservableFactory mapFactory(Realm realm)
          Returns a factory for creating observable maps in the given realm, tracking this property of a particular property source.
 IObservableMap observe(Object source)
          Returns an observable map observing this map property on the given property source
 IObservableMap observeDetail(IObservableValue master)
          Returns an observable map on the master observable's realm which tracks this property of the values in the entry set of master.
 void setMap(Object source, Map map)
          Updates the property on the source with the specified change.
 void updateMap(Object source, MapDiff diff)
          Updates the property on the source with the specified change.
 IMapProperty values(IValueProperty detailValues)
          Returns the nested combination of this property and the specified detail value property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.databinding.property.map.IMapProperty
getKeyType, getValueType, observe
 

Constructor Detail

MapProperty

public MapProperty()
Method Detail

getMap

public final Map getMap(Object source)
Description copied from interface: IMapProperty
Returns an unmodifiable Map with the current contents of the source's map property.

Specified by:
getMap in interface IMapProperty
Parameters:
source - the property source (may be null)
Returns:
a Map with the current contents of the source's map property
Since:
1.3

doGetMap

protected Map doGetMap(Object source)
Returns a Map with the current contents of the source's map property

Parameters:
source - the property source
Returns:
a Map with the current contents of the source's map property
Since:
1.3
Restriction:
This method is not intended to be referenced by clients.

setMap

public final void setMap(Object source,
                         Map map)
Description copied from interface: IMapProperty
Updates the property on the source with the specified change.

Note: This method is made available to facilitate basic property access. However if the property source lacks property change notification, then observables on the source object may not be notified of the change. In most cases it is preferable to modify the source through an IObservableMap than through the property directly.

Specified by:
setMap in interface IMapProperty
Parameters:
source - the property source (may be null)
map - the new map
Since:
1.3

doSetMap

protected void doSetMap(Object source,
                        Map map)
Updates the property on the source with the specified change.

Parameters:
source - the property source
map - the new map
Since:
1.3
Restriction:
This method is not intended to be referenced by clients.

updateMap

public final void updateMap(Object source,
                            MapDiff diff)
Description copied from interface: IMapProperty
Updates the property on the source with the specified change.

Note: This method is made available to facilitate basic property access. However if the property source lacks property change notification, then observables on the source object may not be notified of the change. In most cases it is preferable to modify the source through an IObservableMap than through the property directly.

Specified by:
updateMap in interface IMapProperty
Parameters:
source - the property source (may be null)
diff - a diff describing the change
Since:
1.3

doUpdateMap

protected void doUpdateMap(Object source,
                           MapDiff diff)
Updates the property on the source with the specified change.

Parameters:
source - the property source
diff - a diff describing the change
Since:
1.3
Restriction:
This method is not intended to be referenced by clients.

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
Parameters:
source - the property source
Returns:
an observable map observing this map-typed property on the given property source

mapFactory

public IObservableFactory mapFactory()
Description copied from interface: IMapProperty
Returns a factory for creating observable maps tracking this property of a particular property source.

Specified by:
mapFactory in interface IMapProperty
Returns:
a factory for creating observable maps tracking this property of a particular property source.

mapFactory

public IObservableFactory mapFactory(Realm realm)
Description copied from interface: IMapProperty
Returns a factory for creating observable maps in the given realm, tracking this property of a particular property source.

Specified by:
mapFactory in interface IMapProperty
Parameters:
realm - the realm
Returns:
a factory for creating observable maps in the given realm, tracking this property of a particular property source.

observeDetail

public IObservableMap observeDetail(IObservableValue master)
Description copied from interface: IMapProperty
Returns an observable map on the master observable's realm which tracks this property of the values in the entry set of master.

Specified by:
observeDetail in interface IMapProperty
Parameters:
master - the master observable
Returns:
an observable map on the master observable's realm which tracks this property of the values in the entry set of master.

values

public final IMapProperty values(IValueProperty detailValues)
Description copied from interface: IMapProperty
Returns the nested combination of this property and the specified detail value property. Note that because this property is a projection of value properties over a values collection, the only modifications supported are through the IObservableMap.put(Object, Object) and Map.putAll(java.util.Map) methods. In the latter case, this property does not entries for keys not already contained in the master map's key set. Modifications made through the returned property are delegated to the detail property, using the corresponding entry value from the master property as the source.

Specified by:
values in interface IMapProperty
Parameters:
detailValues - the detail property
Returns:
the nested combination of the master map and detail value properties.

Eclipse Platform
Release 3.6

Guidelines for using Eclipse APIs.

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