Skip to content

Commit 7faa8f0

Browse files
author
nicolaiparlog
committed
Fixed some comments.
1 parent 7ca756f commit 7faa8f0

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
* perhaps most importantly, the last step will lead to the hierarchy's <b>inner observable</b>.
2222
* <p>
2323
* As nesting steps require a value to be accessible, all observables on which a step is used must provide a value.
24-
* Hence they must all implement {@link ObservableValue} (of {@code T}, where {@code T} is no primitive type wrapper or
25-
* {@code String}). No step is used on the inner observable so it suffices that it implements {@link Observable}.
24+
* Hence they must all implement {@link ObservableValue ObservableValue}. No step is used on the inner observable so it
25+
* suffices that it implements {@link Observable}.
2626
* <h3>Example</h3> Consider a class {@code Employee} which has an {@code Property<Address> address}, where
2727
* {@code Address} has a {@code StringProperty streetName}. There might be a {@code Property<Emplyee> currentEmployee},
2828
* which always holds the current employee.
@@ -31,15 +31,20 @@
3131
* the outer observable and {@code address} and {@code streetName} are nested observables. Additionally,
3232
* {@code streetName} is the inner observable.
3333
* <h2>Present or Missing Inner Observable</h2> If all steps return non-null observables and none of them contains null,
34-
* the inner observable can be computed and will be contained in the {@link #innerObservableProperty() innerObservable}
34+
* the inner observable can be accessed and will be contained in the {@link #innerObservableProperty() innerObservable}
3535
* property. In this case it is said to be <b>present</b>. The same is true if only the inner observable contains null.
3636
* <p>
3737
* If any nesting step returns null or any observable except the inner contains null as a value, the nesting hierarchy
38-
* can not be completely computed. The inner observable is said to be <b>missing</b> and the {@code innerObservable}
39-
* property contains {@link Optional#empty()}.
38+
* can not be fully accessed. The inner observable is said to be <b>missing</b> and the {@code innerObservable} property
39+
* contains {@link Optional#empty()}.
4040
* <h2>Evaluation</h2> Nestings will usually be implemented such that they eagerly evaluate the nested observables.
4141
* <h2>Build</h2> Instances of {@code Nesting} can be created with dedicated builders. These can be obtained by starting
4242
* with one of the methods in {@link Nestings}. More details can be found there.
43+
* <p>
44+
* Nestings are also an important building block for creating other nested instances like
45+
* {@link org.codefx.libfx.nesting.property.NestedProperty NestedProperty}. A
46+
* {@link org.codefx.libfx.nesting.NestingObserver NestingObserver} provides a convenient way to work directly with a
47+
* {@code Nesting}.
4348
*
4449
* @see Nestings
4550
* @param <O>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
/**
1010
* Usability class which observes a {@link Nesting} and executes some methods when the nesting's
11-
* {@link Nesting#innerObservableProperty() innerObservable} changes (in that order):
11+
* {@link Nesting#innerObservableProperty() innerObservable} changes. These are the methods and the order in which they
12+
* are called:
1213
* <ol>
1314
* <li>if the old inner observable was present, a method is called with that observable as its argument; the method is
1415
* specified during building (see {@link NestingObserverBuilder#withOldInnerObservable(Consumer) withOldInnerObservable})
@@ -18,7 +19,7 @@
1819
* new observable were/are present; the method is specified during building (see
1920
* {@link NestingObserverBuilder#whenInnerObservableChanges(BiConsumer) whenInnerObservableChanges})
2021
* </ol>
21-
* These methods are also called once after construction. At this point, there is of course no old inner observable
22+
* These methods are also called once during construction. At this point, there is of course no old inner observable
2223
* present.
2324
* <p>
2425
* The observer is created with a {@link NestingObserverBuilder} which can be obtained from

0 commit comments

Comments
 (0)