Skip to content

Commit 4d1ea30

Browse files
author
nicolaiparlog
committed
Removed empty paragraphs from javadocs.
1 parent 19c3d3f commit 4d1ea30

File tree

7 files changed

+14
-25
lines changed

7 files changed

+14
-25
lines changed

src/main/java/org/codefx/libfx/nesting/DeepNesting.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ public void initialize() {
231231
* The updater loops through the levels {@code [startLevel; innerLevel - 1]}, updates {@code observables} and
232232
* {@code values} and moves the {@link DeepNesting#changeListeners} from the old to the new observables. It stops
233233
* when a level is found where the stored value equals the current one. In that case all higher levels must be
234-
* identical and nothing more needs to be updated. <br>
234+
* identical and nothing more needs to be updated.
235+
* <p>
235236
* Note that the loop will not stop on null observables and null values. Instead it continues and replaces all
236237
* stored observables and values with null. This is the desired behavior as the hierarchy is in now an incomplete
237238
* state and the old observables and values are obsolete and have to be replaced.

src/main/java/org/codefx/libfx/nesting/Nesting.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
import javafx.beans.value.ObservableValue;
88

99
/**
10+
* <p>
1011
* A nesting encapsulates a hierarchy of nested {@link ObservableValue ObservableValues} and its
1112
* {@link #innerObservableProperty() innerObservable} property always contains the current innermost {@code Observable}
1213
* in that hierarchy as an {@link Optional}. A {@code Nesting} can be used as a basic building block for other nested
1314
* functionality.
14-
* <p>
1515
* <h2>Nesting Hierarchy</h2> A nesting hierarchy is composed of some {@code ObservableValues}, often simply called
1616
* <b>observables</b>, and <b>nesting steps</b> which lead from one observable to the next.
1717
* <p>
@@ -23,25 +23,21 @@
2323
* As nesting steps require a value to be accessible, all observables on which a step is used must provide a value.
2424
* Hence they must all implement {@link ObservableValue} (of {@code T}, where {@code T} is no primitive type wrapper or
2525
* {@code String}). No step is used on the inner observable so it suffices that it implements {@link Observable}.
26-
* <p>
2726
* <h3>Example</h3> Consider a class {@code Employee} which has an {@code Property<Address> address}, where
2827
* {@code Address} has a {@code StringProperty streetName}. There might be a {@code Property<Emplyee> currentEmployee},
2928
* which always holds the current employee.
3029
* <p>
3130
* In this case the hierarchy would be {@code currentEmployee -> address -> streetName} where {@code currentEmployee} is
3231
* the outer observable and {@code address} and {@code streetName} are nested observables. Additionally,
3332
* {@code streetName} is the inner observable.
34-
* <p>
3533
* <h2>Present or Missing Inner Observable</h2> If all steps return non-null observables and none of them contains null,
3634
* the inner observable can be computed and will be contained in the {@link #innerObservableProperty() innerObservable}
3735
* property. In this case it is said to be <b>present</b>. The same is true if only the inner observable contains null.
3836
* <p>
3937
* If any nesting step returns null or any observable except the inner contains null as a value, the nesting hierarchy
4038
* can not be completely computed. The inner observable is said to be <b>missing</b> and the {@code innerObservable}
4139
* property contains {@link Optional#empty()}.
42-
* <p>
4340
* <h2>Evaluation</h2> Nestings will usually be implemented such that they eagerly evaluate the nested observables.
44-
* <p>
4541
* <h2>Build</h2> Instances of {@code Nesting} can be created with dedicated builders. These can be obtained by starting
4642
* with one of the methods in {@link Nestings}. More details can be found there.
4743
*

src/main/java/org/codefx/libfx/nesting/Nestings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@
1212
import org.codefx.libfx.nesting.property.NestedProperty;
1313

1414
/**
15+
* <p>
1516
* This class provides static functions to obtain builders for nested classes like {@link Nesting} or
1617
* {@link NestedProperty}.
17-
* <p>
1818
* <h2>Builders</h2> Calling {@code on} will return a builder whose type depends on the type of the specified
1919
* observable. Similarly a call to one of the builders' {@code nest...}-methods returns a (new) builder whose type
2020
* depends on the type of observable the nesting step will return. Each type of builder allows only those functions
2121
* which are supported by that observable.
22-
* <p>
2322
* <h3>Examples on Builder Types</h3> If the last nesting step provides a {@link javafx.beans.property.DoubleProperty
2423
* DoubleProperty}, a {@link DoublePropertyNestingBuilder} will be returned. Because a {@code Double} cannot contain
2524
* another observable no further nesting is possible and hence no {@code nest...}-methods are available. But it can be

src/main/java/org/codefx/libfx/nesting/listener/NestedChangeListener.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414
import org.codefx.libfx.nesting.property.NestedProperty;
1515

1616
/**
17+
* <p>
1718
* Contains a {@link ChangeListener} which is connected to a {@link Nesting}. Simply put, the listener is always added
1819
* to the nesting's inner observable (more precisely, it is added to the {@link ObservableValue} instance contained in
1920
* the optional value held by the nesting's {@link Nesting#innerObservableProperty() innerObservable} property).
20-
* <p>
2121
* <h2>Inner Observable's Value Changes</h2> The listener is added to the nesting's inner observable. So when that
2222
* observable's value changes, the listener is called as usual.
23-
* <p>
2423
* <h2>Inner Observable Is Replaced</h2> When the nesting's inner observable is replaced by another, the listener is
2524
* removed from the old and added to the new observable. If one of them is missing, the affected removal or add is not
2625
* performed, which means the listener might not be added to any observable.
@@ -61,12 +60,12 @@ public class NestedChangeListener<T> implements Nested {
6160
this.innerObservablePresent = new SimpleBooleanProperty(this, "innerObservablePresent");
6261

6362
NestingObserver
64-
.forNesting(nesting)
65-
.withOldInnerObservable(oldInnerObservable -> oldInnerObservable.removeListener(listener))
66-
.withNewInnerObservable(newInnerObservable -> newInnerObservable.addListener(listener))
67-
.whenInnerObservableChanges(
68-
(Boolean any, Boolean newInnerObservablePresent)
69-
-> innerObservablePresent.set(newInnerObservablePresent))
63+
.forNesting(nesting)
64+
.withOldInnerObservable(oldInnerObservable -> oldInnerObservable.removeListener(listener))
65+
.withNewInnerObservable(newInnerObservable -> newInnerObservable.addListener(listener))
66+
.whenInnerObservableChanges(
67+
(Boolean any, Boolean newInnerObservablePresent)
68+
-> innerObservablePresent.set(newInnerObservablePresent))
7069
.observe();
7170
}
7271

src/main/java/org/codefx/libfx/nesting/listener/NestedInvalidationListener.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414
import org.codefx.libfx.nesting.property.NestedProperty;
1515

1616
/**
17+
* <p>
1718
* Contains an {@link InvalidationListener} which is connected to a {@link Nesting}. Simply put, the listener is always
1819
* added to the nesting's inner observable (more precisely, it is added to the {@link Observable} instance contained in
1920
* the optional value held by the nesting's {@link Nesting#innerObservableProperty() innerObservable} property).
20-
* <p>
2121
* <h2>Inner Observable's Value is Invalidated</h2> The listener is added to the nesting's inner observable. So when
2222
* that observable's value is invalidated, the listener is called as usual.
23-
* <p>
2423
* <h2>Inner Observable Is Replaced</h2> When the nesting's inner observable is replaced by another, the listener is
2524
* removed from the old and added to the new observable. If one of them is missing, the affected removal or add is not
2625
* performed, which means the listener might not be added to any observable.

src/main/java/org/codefx/libfx/nesting/package-info.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
/**
2+
* <p>
23
* This package provides functionality around nesting hierarchies - a term which is explained in all detail in the
34
* comment on {@link org.codefx.libfx.nesting.Nesting Nesting}.
4-
* <p>
55
* <h2>Nesting</h2> A {@code Nesting} encapsulates a hierarchy of nested {@code ObservableValues} and collapses them
66
* into a property which always contains the current innermost {@code Observable} in that hierarchy. A {@code Nesting}
77
* can be used as a basic building block for other nested functionality (see below).
88
* <p>
99
* See the comment on {@link org.codefx.libfx.nesting.Nesting Nesting} for details.
10-
* <p>
1110
* <h2>Nested Property</h2> A {@code NestedProperty} uses a {@code Nesting} to bind its value to the inner
1211
* {@code Property} in a nesting hierarchy, updating the binding as the inner observable changes its value or is
1312
* replaced. It can thus be used to collapse a nesting hierarchy into a single property.
1413
* <p>
1514
* See the comment on {@link org.codefx.libfx.nesting.property.NestedProperty NestedProperty} for details.
16-
* <p>
1715
* <h2>Nested Listeners</h2> A {@code Nesting} can also be used to add listeners to its inner observable. These
1816
* listeners are moved from one observable to the next as they are replaced.
1917
* <p>
2018
* See the comments on {@link org.codefx.libfx.nesting.listener.NestedChangeListener NestedChangeListener} and
2119
* {@link org.codefx.libfx.nesting.listener.NestedInvalidationListener NestedInvalidationListener} for details.
22-
* <p>
2320
* <h2>Builders</h2> Instances of the classes described above can be build by starting with the methods in
2421
* {@link org.codefx.libfx.nesting.Nestings Nestings}.
2522
*

src/main/java/org/codefx/libfx/nesting/property/NestedProperty.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,17 @@
55
import org.codefx.libfx.nesting.Nesting;
66

77
/**
8+
* <p>
89
* A {@link Property} which is based on a {@link Nesting}. Simply put, this property is always bound to the nesting's
910
* inner observable (more precisely, it is bound to the {@link Property} instance contained in the optional value held
1011
* by the nesting's {@link Nesting#innerObservableProperty() innerObservable} property).
11-
* <p>
1212
* <h2>Inner Observable's Value Changes</h2> This property is bound to the nesting's inner observable. So when that
1313
* observable's value changes, so does this property.
14-
* <p>
1514
* <h2>Inner Observable Is Replaced</h2> When the nesting's inner observable is replaced by a present observable, this
1615
* nested property's value changes to the new observable's value. Like all other value changes this one also results in
1716
* calling invalidation and change listeners.
1817
* <p>
1918
* If the new observable is missing, this property stays unbound and keeps its value (and hence no listener is called).
20-
* <p>
2119
* <h2>Inner Observable is Missing</h2> It is possible that a nesting's inner observable is missing (see comment on
2220
* {@link Nesting}). In that case the {@link NestedProperty#innerObservablePresentProperty() innerObservablePresent}
2321
* property is false and changes made to this property's value can not be propagated to another property.

0 commit comments

Comments
 (0)