Skip to content

Commit b2e2000

Browse files
committed
8252546: Move ObservableValue's equality check and lazy evaluation descriptions to @implSpec
Reviewed-by: kcr, arapte
1 parent 976a763 commit b2e2000

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

modules/javafx.base/src/main/java/javafx/beans/value/ObservableValue.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,11 @@
3939
* <p>
4040
* An implementation of {@code ObservableValue} may support lazy evaluation,
4141
* which means that the value is not immediately recomputed after changes, but
42-
* lazily the next time the value is requested. All bindings and properties in
43-
* this library support lazy evaluation.
42+
* lazily the next time the value is requested (see note 1 in "Implementation Requirements").
4443
* <p>
4544
* An {@code ObservableValue} generates two types of events: change events and
46-
* invalidation events. A change event indicates that the value has changed.
47-
* Current implementing classes in JavaFX check for a change using reference
48-
* equality (and not object equality, {@code Object#equals(Object)}) of the value. An
45+
* invalidation events. A change event indicates that the value has changed
46+
* (see note 2 in "Implementation Requirements"). An
4947
* invalidation event is generated if the current value is not valid anymore.
5048
* This distinction becomes important if the {@code ObservableValue} supports
5149
* lazy evaluation, because for a lazily evaluated value one does not know if an
@@ -70,6 +68,12 @@
7068
* @param <T>
7169
* The type of the wrapped value.
7270
*
71+
* @implSpec <ol>
72+
* <li> All bindings and properties in the JavaFX library support lazy evaluation.</li>
73+
* <li> All implementing classes in the JavaFX library check for a change using reference
74+
* equality (and not object equality, {@code Object#equals(Object)}) of the value.</li>
75+
* </ol>
76+
*
7377
* @see ObservableBooleanValue
7478
* @see ObservableDoubleValue
7579
* @see ObservableFloatValue

0 commit comments

Comments
 (0)