org.eclipse.gef.common.beans.property

## Class SimpleMapPropertyEx<K,V>

- java.lang.Object
- - javafx.beans.binding.MapExpression<K,V>
  - - javafx.beans.property.ReadOnlyMapProperty<K,V>
    - - javafx.beans.property.MapProperty<K,V>
      - - javafx.beans.property.MapPropertyBase<K,V>
        - - javafx.beans.property.SimpleMapProperty<K,V>
          - - org.eclipse.gef.common.beans.property.SimpleMapPropertyEx<K,V>

Type Parameters:
  `K` - The key type of the wrapped `ObservableMap`.
  `V` - The value type of the wrapped `ObservableMap`.

All Implemented Interfaces:
  Map<K,V>, Observable, Property<ObservableMap<K,V>>, ReadOnlyProperty<ObservableMap<K,V>>, ObservableMapValue<K,V>, ObservableObjectValue<ObservableMap<K,V>>, ObservableValue<ObservableMap<K,V>>, WritableMapValue<K,V>, WritableObjectValue<ObservableMap<K,V>>, WritableValue<ObservableMap<K,V>>, ObservableMap<K,V>

    public class SimpleMapPropertyEx<K,V>
    extends SimpleMapProperty<K,V>

A replacement for `SimpleMapProperty` to fix the following JavaFX issues:

- Change notifications are fired even when the observed value did not change.(https://bugs.openjdk.java.net/browse/JDK-8089169)
- All listeners were removed when removing one (https://bugs.openjdk.java.net/browse/JDK-8136465): fixed by keeping track of all listeners and ensuring that remaining listeners are re-added when a listener is removed.

### Property Summary

### Properties inherited from class javafx.beans.property.MapPropertyBase

`empty, size`

### Nested Class Summary

### Nested classes/interfaces inherited from interface java.util.Map

`Map.Entry<K,V>`

### Constructor Summary

Constructors
Constructor and Description
`SimpleMapPropertyEx()` Creates a new unnamed `SimpleMapPropertyEx`.
`SimpleMapPropertyEx(Object bean, String name)` Constructs a new `SimpleMapPropertyEx` for the given bean and with the given name.
`SimpleMapPropertyEx(Object bean, String name, ObservableMap<K,V> initialValue)` Constructs a new `SimpleMapPropertyEx` for the given bean and with the given name and initial value.
`SimpleMapPropertyEx(ObservableMap<K,V> initialValue)` Constructs a new unnamed `SimpleMapPropertyEx` that is not related to a bean, with the given initial value.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addListener(ChangeListener<? super ObservableMap<K,V>> listener)`
`void` `addListener(InvalidationListener listener)`
`void` `addListener(MapChangeListener<? super K,? super V> listener)`
`protected void` `fireValueChangedEvent()`
`protected void` `fireValueChangedEvent(MapChangeListener.Change<? extends K,? extends V> change)`
`int` `hashCode()`
`void` `removeListener(ChangeListener<? super ObservableMap<K,V>> listener)`
`void` `removeListener(InvalidationListener listener)`
`void` `removeListener(MapChangeListener<? super K,? super V> listener)`

### Methods inherited from class javafx.beans.property.SimpleMapProperty

`getBean, getName`

### Methods inherited from class javafx.beans.property.MapPropertyBase

`bind, emptyProperty, get, invalidated, isBound, set, sizeProperty, toString, unbind`

### Methods inherited from class javafx.beans.property.MapProperty

`bindBidirectional, setValue, unbindBidirectional`

### Methods inherited from class javafx.beans.property.ReadOnlyMapProperty

`bindContent, bindContentBidirectional, equals, unbindContent, unbindContentBidirectional`

### Methods inherited from class javafx.beans.binding.MapExpression

`asString, clear, containsKey, containsValue, entrySet, get, getSize, getValue, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, keySet, mapExpression, put, putAll, remove, size, valueAt, valueAt, values`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface javafx.beans.value.ObservableValue

`getValue`

### Methods inherited from interface javafx.beans.value.WritableValue

`getValue`

### Methods inherited from interface java.util.Map

`clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

### Constructor Detail

#### SimpleMapPropertyEx

    public SimpleMapPropertyEx()

Creates a new unnamed `SimpleMapPropertyEx`.

#### SimpleMapPropertyEx

    public SimpleMapPropertyEx(Object bean,
                               String name)

Constructs a new `SimpleMapPropertyEx` for the given bean and with the given name.

Parameters:
  `bean` - The bean this property is related to.
  `name` - The name of the property.

#### SimpleMapPropertyEx

    public SimpleMapPropertyEx(Object bean,
                               String name,
                               ObservableMap<K,V> initialValue)

Constructs a new `SimpleMapPropertyEx` for the given bean and with the given name and initial value.

Parameters:
  `bean` - The bean this property is related to.
  `name` - The name of the property.
  `initialValue` - The initial value of the property

#### SimpleMapPropertyEx

    public SimpleMapPropertyEx(ObservableMap<K,V> initialValue)

Constructs a new unnamed `SimpleMapPropertyEx` that is not related to a bean, with the given initial value.

Parameters:
  `initialValue` - The initial value of the property

### Method Detail

#### addListener

    public void addListener(ChangeListener<? super ObservableMap<K,V>> listener)

Specified by:
  `addListener` in interface `ObservableValue<ObservableMap<K,V>>`
Overrides:
  `addListener` in class `MapPropertyBase<K,V>`

#### addListener

    public void addListener(InvalidationListener listener)

Specified by:
  `addListener` in interface `Observable`
Overrides:
  `addListener` in class `MapPropertyBase<K,V>`

#### addListener

    public void addListener(MapChangeListener<? super K,? super V> listener)

Specified by:
  `addListener` in interface `ObservableMap<K,V>`
Overrides:
  `addListener` in class `MapPropertyBase<K,V>`

#### fireValueChangedEvent

    protected void fireValueChangedEvent()

Overrides:
  `fireValueChangedEvent` in class `MapPropertyBase<K,V>`

#### fireValueChangedEvent

    protected void fireValueChangedEvent(MapChangeListener.Change<? extends K,? extends V> change)

Overrides:
  `fireValueChangedEvent` in class `MapPropertyBase<K,V>`

#### hashCode

    public int hashCode()

Specified by:
  `hashCode` in interface `Map<K,V>`
Overrides:
  `hashCode` in class `ReadOnlyMapProperty<K,V>`

#### removeListener

    public void removeListener(ChangeListener<? super ObservableMap<K,V>> listener)

Specified by:
  `removeListener` in interface `ObservableValue<ObservableMap<K,V>>`
Overrides:
  `removeListener` in class `MapPropertyBase<K,V>`

#### removeListener

    public void removeListener(InvalidationListener listener)

Specified by:
  `removeListener` in interface `Observable`
Overrides:
  `removeListener` in class `MapPropertyBase<K,V>`

#### removeListener

    public void removeListener(MapChangeListener<? super K,? super V> listener)

Specified by:
  `removeListener` in interface `ObservableMap<K,V>`
Overrides:
  `removeListener` in class `MapPropertyBase<K,V>`