I have come across what seems like a peculiarity in the JavaFX API: LongProperty
implements Property<Number>
, but not Property<Long>
.
What is the reason for this? I sort of get the idea that it all stems from Java's inherent problem with covariance and contravariance, because generics where implemented stupidly via erasure, to maintain backwards compatibility with the bytecode; but what problem could have arisen by having LongProperty
implement both Property<Number>
and Property<Long>
?
Edit: This question originated from this problem: Apply LongProperty to TableColumn programmatically (vs semantically)