RFR: 8274771: Map, FlatMap and OrElse fluent bindings for ObservableValue [v3]
Michael Strauß
mstrauss at openjdk.java.net
Wed Jan 5 13:28:13 UTC 2022
On Wed, 5 Jan 2022 12:08:01 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> modules/javafx.base/src/main/java/javafx/beans/value/ObservableValue.java line 188:
>>
>>> 186: * {@code ObservableValue} given by applying {@code mapper} on the value
>>> 187: * held by this {@code ObservableValue}, and is {@code null} when this
>>> 188: * {@code ObservableValue} holds {@code null}, never null
>>
>> an {@code ObservableValue} that holds the value of the {@code ObservableValue} resulting
>> from applying a mapping on the value held by this {@code ObservableValue}; never {@code null} itself
>
> How about:
>
> an {@code ObservableValue} holding the value of an {@code ObservableValue}
> resulting from a mapping of this {@code ObservableValue}'s value or
> holds {@code null} when the value is {@code null}; never returns {@code null}
>
> They are tough to describe; if you don't like the `or holds {@code null}` parts I can remove those from all the functions.
Here's another attempt:
a new {@link ObservableValue} instance that holds the value that was obtained by
applying the mapping function on the value held by this {@code ObservableValue}.
If this {@code ObservableValue} holds {@code null}, the new {@code ObservableValue}
will also hold {@code null}.
-------------
PR: https://git.openjdk.java.net/jfx/pull/675
More information about the openjfx-dev
mailing list