Interface IMapProperty<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 Superinterfaces:
IProperty
- All Known Subinterfaces:
IBeanMapProperty<S,
K, V>
- All Known Implementing Classes:
DelegatingMapProperty
,MapProperty
,SimpleMapProperty
- Since:
- 1.2
- See Also:
- Restriction:
- This interface is not intended to be implemented by clients.
Clients should instead subclass one of the classes that
implement this interface.
Authors of extensions to the databinding framework may extend this interface and indirectly implement it, but if doing so must also extend one of the framework classes. (Use an API problem filter to suppress the resulting warning.)
Direct implementers of this interface outside of the framework will be broken in future releases when methods are added to this interface.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the element type of the map's key set ornull
if the key set is untyped.Returns an unmodifiable Map with the current contents of the source's map property.Returns the element type of the map's values collection ornull
if the collection is untyped.Returns a factory for creating observable maps tracking this property of a particular property source.mapFactory
(Realm realm) Returns a factory for creating observable maps in the given realm, tracking this property of a particular property source.Returns an observable map observing this map property on the given property sourceReturns an observable map observing this map property on the given property source<U extends S>
IObservableMap<K,V> observeDetail
(IObservableValue<U> master) Returns an observable map on the master observable's realm which tracks this property of the values in the entry set ofmaster
.void
Updates the property on the source with the specified change.void
Updates the property on the source with the specified change.<T> IMapProperty<S,
K, T> values
(IValueProperty<? super V, T> detailValues) Returns the nested combination of this property and the specified detail value property.
-
Method Details
-
getKeyType
Object getKeyType()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
Object getValueType()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.
-
getMap
Returns an unmodifiable Map with the current contents of the source's map property.- Parameters:
source
- the property source (may be null)- Returns:
- a Map with the current contents of the source's map property
- Since:
- 1.3
-
setMap
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.- Parameters:
source
- the property source (may be null)map
- the new map- Since:
- 1.3
-
updateMap
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.- Parameters:
source
- the property source (may be null)diff
- a diff describing the change- Since:
- 1.3
-
observe
Returns an observable map observing this map property on the given property source- Parameters:
source
- the property source- Returns:
- an observable map observing this map-typed property on the given property source
-
observe
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
-
mapFactory
IObservableFactory<S,IObservableMap<K, mapFactory()V>> Returns a factory for creating observable maps tracking this property of a particular property source.- Returns:
- a factory for creating observable maps tracking this property of a particular property source.
-
mapFactory
Returns a factory for creating observable maps in the given realm, tracking this property of a particular property source.- Parameters:
realm
- the realm- Returns:
- a factory for creating observable maps in the given realm, tracking this property of a particular property source.
-
observeDetail
Returns an observable map on the master observable's realm which tracks this property of the values in the entry set ofmaster
.- 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
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 theIObservableMap.put(Object, Object)
andMap.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.- Parameters:
detailValues
- the detail property- Returns:
- the nested combination of the master map and detail value properties.
-