This content has been marked as final. Show 2 replies
This is because of the following fact:
Which is a design mistake IMO.
interface ObservableNumberValue extends ObservableValue<java.lang.Number> interface ObservableIntegerValue extends ObservableNumberValue
I think it should have been
instead, but I haven't looked very deeply into it.
interface ObservableNumberValue<T extends java.lang.Number> extends ObservableValue<T> interface ObservableIntegerValue extends ObservableNumberValue<Integer>
See also IntegerProperty implements ObservableValue<Number>
Thank you very much for your help.
I'll use the ReadOnlyObjectWrapper solution, if values don't need to be editable. Otherwise the ObservableObjectValue<Integer> would be my way.