ObservableSetSize
An ObservableInt whose value is the size of an ObservableSet.
As example of where this might be useful. Suppose we want to disable a button when a set is empty. Simply bind its disabledProperty
to :
ObservableSetSize(mySet).equalTo(0)
Content copied to clipboard
Alternatively, we might want a label to contain a list's size, in which case, bind its textProperty
to :
ObservableSetSize(mySet).toObservableString()
Content copied to clipboard