# Uses of Interface
javafx.util.Subscription

Packages that use Subscription
Package
Description
javafx.beans
The package `javafx.beans` contains the interfaces that define the most generic form of observability.
javafx.beans.value
The package `javafx.beans.value` contains the two fundamental interfaces `ObservableValue` and `WritableValue` and all of its sub-interfaces.
javafx.util
Contains various utilities and helper classes.

- ## Uses of Subscription in javafx.beans

  Methods in javafx.beans that return Subscription
  Modifier and Type
  Method
  Description
  `default Subscription`
  Observable.`subscribe(Runnable invalidationSubscriber)`
  Creates a `Subscription` on this `Observable` which calls `invalidationSubscriber` whenever it becomes invalid.

- ## Uses of Subscription in javafx.beans.value

  Methods in javafx.beans.value that return Subscription
  Modifier and Type
  Method
  Description
  `default Subscription`
  ObservableValue.`subscribe(BiConsumer<? super T, ? super T> changeSubscriber)`
  Creates a `Subscription` on this `ObservableValue` which calls the given `changeSubscriber` with the old and new value whenever its value changes.
  `default Subscription`
  ObservableValue.`subscribe(Consumer<? super T> valueSubscriber)`
  Creates a `Subscription` on this `ObservableValue` which immediately provides the current value to the given `valueSubscriber`, followed by any subsequent values whenever its value changes.

- ## Uses of Subscription in javafx.util

  Fields in javafx.util declared as Subscription
  Modifier and Type
  Field
  Description
  `static final Subscription`
  Subscription.`EMPTY`
  An empty subscription.
  Methods in javafx.util that return Subscription
  Modifier and Type
  Method
  Description
  `default Subscription`
  Subscription.`and(Subscription other)`
  Combines this `Subscription` with the given `Subscription` and returns a new `Subscription` which will cancel both when cancelled.
  `static Subscription`
  Subscription.`combine(Subscription... subscriptions)`
  Returns a `Subscription` which combines all of the given subscriptions.
  Methods in javafx.util with parameters of type Subscription
  Modifier and Type
  Method
  Description
  `default Subscription`
  Subscription.`and(Subscription other)`
  Combines this `Subscription` with the given `Subscription` and returns a new `Subscription` which will cancel both when cancelled.
  `static Subscription`
  Subscription.`combine(Subscription... subscriptions)`
  Returns a `Subscription` which combines all of the given subscriptions.