I'm trying to make an EventStream
from a DoubleProperty
in ReactFX (I've tried both 2.0M5 and 1.4.1 stable). I constantly get this error from IntelliJ:
I've tried using the sample code from the wiki:
Circle streamCircle = new Circle();
EventStream<Double> widthValues = EventStreams.nonNullValuesOf(streamCircle.radiusProperty());
...and I get the same error.
What am I doing wrong?
DoubleProperty
,IntegerProperty
and similar properties implementObservableValue<Number>
, notObservableValue<Double>
,ObservableValue<Integer>
, ect.You could use
asObject
for conversion to such a type:But if I correctly understand what
nonNullValuesOf
is supposed to do, you should replace this byEventStreams.valuesOf
, since aDoubleProperty
never containsnull
as value.