API Review: Use ObservableNumberValue as parameter for valueAt() methods

Martin Sladecek martin.sladecek at oracle.com
Tue Nov 6 04:14:51 PST 2012

Yes, the (old) ObservableIntegerValue method would just directly call 
the new version with ObservableNumberValue (which is superclass of 
ObservableIntegerValue), so it would just create extra noise in the API.


On 11/02/2012 09:52 PM, Richard Bair wrote:
> The existing methods would continue to function though, is that right? They wouldn't need to be deprecated from a functional perspective (i.e.: they aren't totally broken), but they're just extra noise in the API?
> Richard
> On Sep 18, 2012, at 12:19 AM, Michael Heinrichs <michael.heinrichs at oracle.com> wrote:
>> Hi,
>> currently the various valueAt() methods expect an ObservableIntegerValue for the index. (The valueAt() methods create a binding to request a specific element in an ObservableList.) This is wrong, the type should have been an ObservableNumberValue, because this fits to the general philosophy of the binding API. (In general the binding API tries to loosen the type system as much as possible without dropping the ability to use primitives internally.)
>> I want to add new versions of the various valueAt() methods that expect ObservableNumberValue for the index. The current methods will be marked as deprecated and should be removed in a future incompatible update of the JavaFX API.
>> Thanks,
>> Michael

More information about the openjfx-dev mailing list