Module javafx.base
Package javafx.beans.property

# Class ReadOnlySetPropertyBase<E>

java.lang.Object
javafx.beans.binding.SetExpression<E>
javafx.beans.property.ReadOnlySetProperty<E>
javafx.beans.property.ReadOnlySetPropertyBase<E>

Type Parameters:
  `E` - the type of the `Set` elements

All Implemented Interfaces:
  `Iterable<E>`, `Collection<E>`, `Set<E>`, `Observable`, `ReadOnlyProperty<ObservableSet<E>>`, `ObservableObjectValue<ObservableSet<E>>`, `ObservableSetValue<E>`, `ObservableValue<ObservableSet<E>>`, `ObservableSet<E>`

    public abstract class ReadOnlySetPropertyBase<E>
    extends ReadOnlySetProperty<E>

Base class for all readonly properties wrapping an `ObservableSet`. This class provides a default implementation to attach listener.

Since:
  JavaFX 2.1
See Also:
  `ReadOnlySetProperty`

- ## Property Summary

  ### Properties declared in class javafx.beans.binding.SetExpression

  `empty, size`

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `ReadOnlySetPropertyBase()` | Creates a default `ReadOnlySetPropertyBase`.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `protected void` | `fireValueChangedEvent()` | This method needs to be called if the reference to the `ObservableSet` changes.
  `protected void` | `fireValueChangedEvent​(SetChangeListener.Change<? extends E> change)` | This method needs to be called if the content of the referenced `ObservableSet` changes.

  ### Methods declared in class javafx.beans.property.ReadOnlySetProperty

  `bindContent, bindContentBidirectional, hashCode, toString, unbindContent, unbindContentBidirectional`

  ### Methods declared in class javafx.beans.binding.SetExpression

  `asString, emptyProperty, getSize, isEqualTo, isNotEqualTo, isNotNull, isNull, setExpression, sizeProperty`

  ### Methods declared in class java.lang.Object

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

  ### Methods declared in interface java.util.Collection

  `parallelStream, removeIf, stream, toArray`

  ### Methods declared in interface java.lang.Iterable

  `forEach`

  ### Methods declared in interface javafx.beans.Observable

  `addListener, removeListener`

  ### Methods declared in interface javafx.beans.value.ObservableObjectValue

  `get`

  ### Methods declared in interface javafx.collections.ObservableSet

  `addListener, removeListener`

  ### Methods declared in interface javafx.beans.value.ObservableValue

  `addListener, getValue, removeListener`

  ### Methods declared in interface javafx.beans.property.ReadOnlyProperty

  `getBean, getName`

  ### Methods declared in interface java.util.Set

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

- ## Constructor Details

  - ### ReadOnlySetPropertyBase

    public ReadOnlySetPropertyBase()
    Creates a default `ReadOnlySetPropertyBase`.

- ## Method Details

  - ### fireValueChangedEvent

    protected void fireValueChangedEvent()
    This method needs to be called if the reference to the `ObservableSet` changes. It sends notifications to all attached `InvalidationListeners`, `ChangeListeners`, and `SetChangeListener`. This method needs to be called, if the value of this property changes.

  - ### fireValueChangedEvent

    protected void fireValueChangedEvent​(SetChangeListener.Change<? extends E> change)
    This method needs to be called if the content of the referenced `ObservableSet` changes. Sends notifications to all attached `InvalidationListeners`, `ChangeListeners`, and `SetChangeListener`. This method is called when the content of the list changes.
    Parameters:
      `change` - the change that needs to be propagated