org.eclipse.gef.common.beans.property

## Class SimpleSetPropertyEx<E>

- java.lang.Object
- - javafx.beans.binding.SetExpression<E>
  - - javafx.beans.property.ReadOnlySetProperty<E>
    - - javafx.beans.property.SetProperty<E>
      - - javafx.beans.property.SetPropertyBase<E>
        - - javafx.beans.property.SimpleSetProperty<E>
          - - org.eclipse.gef.common.beans.property.SimpleSetPropertyEx<E>

Type Parameters:
  `E` - The element type of the `SimpleSetProperty`.

All Implemented Interfaces:
  Iterable<E>, Collection<E>, Set<E>, Observable, Property<ObservableSet<E>>, ReadOnlyProperty<ObservableSet<E>>, ObservableObjectValue<ObservableSet<E>>, ObservableSetValue<E>, ObservableValue<ObservableSet<E>>, WritableObjectValue<ObservableSet<E>>, WritableSetValue<E>, WritableValue<ObservableSet<E>>, ObservableSet<E>

    public class SimpleSetPropertyEx<E>
    extends SimpleSetProperty<E>

A replacement for `SimpleSetProperty` to fix the following JavaFX issue:

- Change notifications are fired even when the observed value did not change.(https://bugs.openjdk.java.net/browse/JDK-8089169)

### Property Summary

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

`empty, size`

### Constructor Summary

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

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addListener(ChangeListener<? super ObservableSet<E>> listener)`
`void` `addListener(InvalidationListener listener)`
`void` `addListener(SetChangeListener<? super E> listener)`
`protected void` `fireValueChangedEvent()`
`protected void` `fireValueChangedEvent(SetChangeListener.Change<? extends E> change)`
`int` `hashCode()`
`void` `removeListener(ChangeListener<? super ObservableSet<E>> listener)`
`void` `removeListener(InvalidationListener listener)`
`void` `removeListener(SetChangeListener<? super E> listener)`

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

`getBean, getName`

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

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

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

`bindBidirectional, setValue, unbindBidirectional`

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

`bindContent, bindContentBidirectional, equals, unbindContent, unbindContentBidirectional`

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

`add, addAll, asString, clear, contains, containsAll, getSize, getValue, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, iterator, remove, removeAll, retainAll, setExpression, size, toArray, toArray`

### 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.Set

`add, addAll, clear, contains, containsAll, equals, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArray`

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

`parallelStream, removeIf, stream`

### Methods inherited from interface java.lang.Iterable

`forEach`

### Constructor Detail

#### SimpleSetPropertyEx

    public SimpleSetPropertyEx()

Creates a new unnamed `SimpleSetPropertyEx`.

#### SimpleSetPropertyEx

    public SimpleSetPropertyEx(Object bean,
                               String name)

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

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

#### SimpleSetPropertyEx

    public SimpleSetPropertyEx(Object bean,
                               String name,
                               ObservableSet<E> initialValue)

Constructs a new `SimpleSetPropertyEx` 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

#### SimpleSetPropertyEx

    public SimpleSetPropertyEx(ObservableSet<E> initialValue)

Constructs a new unnamed `SimpleSetPropertyEx` 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 ObservableSet<E>> listener)

Specified by:
  `addListener` in interface `ObservableValue<ObservableSet<E>>`
Overrides:
  `addListener` in class `SetPropertyBase<E>`

#### addListener

    public void addListener(InvalidationListener listener)

Specified by:
  `addListener` in interface `Observable`
Overrides:
  `addListener` in class `SetPropertyBase<E>`

#### addListener

    public void addListener(SetChangeListener<? super E> listener)

Specified by:
  `addListener` in interface `ObservableSet<E>`
Overrides:
  `addListener` in class `SetPropertyBase<E>`

#### fireValueChangedEvent

    protected void fireValueChangedEvent()

Overrides:
  `fireValueChangedEvent` in class `SetPropertyBase<E>`

#### fireValueChangedEvent

    protected void fireValueChangedEvent(SetChangeListener.Change<? extends E> change)

Overrides:
  `fireValueChangedEvent` in class `SetPropertyBase<E>`

#### hashCode

    public int hashCode()

Specified by:
  `hashCode` in interface `Collection<E>`
Specified by:
  `hashCode` in interface `Set<E>`
Overrides:
  `hashCode` in class `ReadOnlySetProperty<E>`

#### removeListener

    public void removeListener(ChangeListener<? super ObservableSet<E>> listener)

Specified by:
  `removeListener` in interface `ObservableValue<ObservableSet<E>>`
Overrides:
  `removeListener` in class `SetPropertyBase<E>`

#### removeListener

    public void removeListener(InvalidationListener listener)

Specified by:
  `removeListener` in interface `Observable`
Overrides:
  `removeListener` in class `SetPropertyBase<E>`

#### removeListener

    public void removeListener(SetChangeListener<? super E> listener)

Specified by:
  `removeListener` in interface `ObservableSet<E>`
Overrides:
  `removeListener` in class `SetPropertyBase<E>`