What is the difference between get() and GetValue() in DoublePropertyBase?

java, javafx, properties

Solution

If you look at the source code of the superclass of `DoubleProperty` you can see that both methods return the same value. `get()` returns the primitive type `double` and `getValue()` a `Double` object.

javafx.beans.binding.DoubleExpression

@Override
public Double getValue() {
    return get();
}

javafx.beans.property.ReadOnlyDoubleProperty

@Override
public double get() {
    valid = true;
    final T value = property.getValue();
    return value == null ? 0.0 : value.doubleValue();
}

Problem

I had this listing and i can't see what is the porpouse: ``` DoubleProperty value = new DoublePropertyBase(0) { @Override protected void invalidated() { if (getValue() < get()) setValue(get()); } @Override public String getName() { return "value"; } }; ``` Is like getValue() is the new Value and get() is the old, but the documentation does not say that.

Original source

Related problems