The Property
interface added by JavaFX has a type parameter T
, which is the type of the value wrapped by the property.
Among the implementations of the Property
interface, there are some for numbers: IntegerProperty
, FloatProperty
, etc. All these classes implement Property<Number>
.
Let's take IntegerProperty
for example. What is the reason why it implements Property<Number>
and not Property<Integer>
as I would have expected?
Here is an UML diagram which clarify the hierarchy of IntegerProperty
: