Module javafx.base

# Package javafx.beans.value

package javafx.beans.value

The package `javafx.beans.value` contains the two fundamental interfaces `ObservableValue` and `WritableValue` and all of its sub-interfaces.

## ObservableValue

An ObservableValue wraps a value that can be read and observed for invalidations and changes. Listeners have to implement either `InvalidationListener` or `ChangeListener`. To allow working with primitive types directly a number of sub-interfaces are defined.

ObservableValue Table
Type | Sub-interface of ObservableValue
--- | ---
`boolean` | `ObservableBooleanValue`
`double` | `ObservableDoubleValue`
`float` | `ObservableFloatValue`
`int` | `ObservableIntegerValue`
`long` | `ObservableLongValue`
`double`, `float`, `int`, `long` | `ObservableNumberValue`
`Object` | `ObservableObjectValue`
`String` | `ObservableStringValue`

## WritableValue

A WritableValue wraps a value that can be read and set. As with `ObservableValues`, a number of sub-interfaces are defined to work with primitive types directly.

WritableValue Table
Type | Sub-interface of WritableValue
--- | ---
`boolean` | `WritableBooleanValue`
`double` | `WritableDoubleValue`
`float` | `WritableFloatValue`
`int` | `WritableIntegerValue`
`long` | `WritableLongValue`
`double`, `float`, `int`, `long` | `WritableNumberValue`
`Object` | `WritableObjectValue`
`String` | `WritableStringValue`

- Related Packages
  Package
  Description
  javafx.beans
  The package `javafx.beans` contains the interfaces that define the most generic form of observability.
  javafx.beans.binding
  Provides classes that create and operate on a `Binding` that calculates a value that depends on one or more sources.
  javafx.beans.property
  The package `javafx.beans.property` defines read-only properties and writable properties, plus a number of implementations.
- Class
  Description
  ChangeListener<T>
  A `ChangeListener` is notified whenever the value of an `ObservableValue` changes.
  ObservableBooleanValue
  An observable boolean value.
  ObservableDoubleValue
  An observable double value.
  ObservableFloatValue
  An observable float value.
  ObservableIntegerValue
  An observable integer value.
  ObservableListValue<E>
  An observable reference to an `ObservableList`.
  ObservableLongValue
  An observable long value.
  ObservableMapValue<K,V>
  An observable reference to an `ObservableMap`.
  ObservableNumberValue
  A common interface of all sub-interfaces of `ObservableValue` that wrap a number.
  ObservableObjectValue<T>
  An observable typed `Object` value.
  ObservableSetValue<E>
  An observable reference to an `ObservableSet`.
  ObservableStringValue
  An observable String value.
  ObservableValue<T>
  An `ObservableValue` is an entity that wraps a value and allows to observe the value for changes.
  ObservableValueBase<T>
  A convenience class for creating implementations of `ObservableValue`.
  WeakChangeListener<T>
  A `WeakChangeListener` can be used if an `ObservableValue` should only maintain a weak reference to the listener.
  WritableBooleanValue
  A writable boolean value.
  WritableDoubleValue
  A writable double value.
  WritableFloatValue
  A writable float value.
  WritableIntegerValue
  A writable int value.
  WritableListValue<E>
  A writable reference to an `ObservableList`.
  WritableLongValue
  A writable long value.
  WritableMapValue<K,V>
  A writable reference to an `ObservableMap`.
  WritableNumberValue
  A tagging interface that marks all sub-interfaces of `WritableValue` that wrap a number.
  WritableObjectValue<T>
  A writable typed value.
  WritableSetValue<E>
  A writable reference to an `ObservableSet`.
  WritableStringValue
  A writable String.
  WritableValue<T>
  A `WritableValue` is an entity that wraps a value that can be read and set.