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

I had this ad and I don’t see what porpouse is:

DoubleProperty value = new DoublePropertyBase(0) {
        @Override protected void invalidated() {
            if (getValue() < get()) setValue(get());
        }
        @Override public String getName() { return "value"; }
    };

It seems that getValue () is a new value and get () is old, but the documentation does not say so.

+4
source share
1 answer

If you look at the source code of the superclass DoubleProperty, you will see that the stand methods return the same value. Get as a primitive type doubleand getValue objectdouble

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();
+6
source

Source: https://habr.com/ru/post/1543241/


All Articles