Interfaces and classes for representing and observing properties of objects.

Package Specification

This package and its subpackages provide the IProperty, IValueProperty, IListProperty, ISetProperty and IMapProperty interfaces, along with classes which serve as base implementations of each interface.

Properties are intended to serve as a convenient path to creating observables for observing specific attributes of source objects. The main goals of this API are:

  • Simplify the process of creating custom observables. Developing custom observables correctly can be tricky, so the properties API tries to ease this burden by providing all the observable implementations. Property implementers only need to extend one of the provided base classes (SimpleValueProperty, SimpleListProperty, SimpleSetProperty or SimpleMapProperty) and implement a handful of abstract methods which the observables use to function.
  • Simplify observation of nested properties. Traditionally observing a nested property required creating an observable for the first property, then wrapping that observable in a master-detail observable for each successive property in the chain. Using property chaining it is trivial to define a nested property and to observe that property on a particular source object.

A set of delegating properties are also provided (DelegatingValueProperty, DelegatingListProperty, DelegatingSetProperty and DelegatingMapProperty) which may be used to implement properties where the property behavior depends on the type of source object.