Class SimpleMapProperty<S,​K,​V>

    • Constructor Detail

      • SimpleMapProperty

        public SimpleMapProperty()
    • Method Detail

      • observe

        public IObservableMap<K,​V> observe​(Realm realm,
                                                 S 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
      • doGetMap

        protected abstract Map<K,​V> doGetMap​(S source)
        Description copied from class: MapProperty
        Returns a Map with the current contents of the source's map property
        Overrides:
        doGetMap in class MapProperty<S,​K,​V>
        Parameters:
        source - the property source
        Returns:
        a Map with the current contents of the source's map property
      • setMap

        public final void setMap​(S source,
                                 Map<K,​V> map,
                                 MapDiff<K,​V> diff)
        Updates the property on the source with the specified change.
        Parameters:
        source - the property source
        map - the new map
        diff - a diff describing the change
        Since:
        1.6
        Restriction:
        This method is not intended to be referenced by clients.
      • doSetMap

        protected abstract void doSetMap​(S source,
                                         Map<K,​V> map,
                                         MapDiff<K,​V> diff)
        Updates the property on the source with the specified change.
        Parameters:
        source - the property source
        map - the new map
        diff - a diff describing the change
        Restriction:
        This method is not intended to be referenced by clients.
      • doSetMap

        protected void doSetMap​(S source,
                                Map<K,​V> map)
        Description copied from class: MapProperty
        Updates the property on the source with the specified change.
        Overrides:
        doSetMap in class MapProperty<S,​K,​V>
        Parameters:
        source - the property source
        map - the new map
      • doUpdateMap

        protected void doUpdateMap​(S source,
                                   MapDiff<K,​V> diff)
        Description copied from class: MapProperty
        Updates the property on the source with the specified change.
        Overrides:
        doUpdateMap in class MapProperty<S,​K,​V>
        Parameters:
        source - the property source
        diff - a diff describing the change
      • adaptListener

        public abstract INativePropertyListener<S> adaptListener​(ISimplePropertyListener<S,​MapDiff<K,​V>> listener)
        Returns a listener capable of adding or removing itself as a listener on a source object using the the source's "native" listener API. Events received from the source objects are parlayed to the specified listener argument.

        This method returns null if the source object has no listener APIs for this property.

        Parameters:
        listener - the property listener to receive events
        Returns:
        a native listener which parlays property change events to the specified listener, or null if the source object has no listener APIs for this property.
        Since:
        1.5
        Restriction:
        This method is not intended to be referenced by clients.