Skip to content

Commit 437da5d

Browse files
author
nicolaiparlog
committed
Push the explanation about forwarding into the package comment
1 parent 80f5263 commit 437da5d

File tree

5 files changed

+11
-17
lines changed

5 files changed

+11
-17
lines changed

src/main/java/org/codefx/libfx/collection/transform/TransformingCollection.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
* the transformation {@code null -> null}. The transforming functions specified during construction neither have to
1919
* handle that case nor are they allowed to produce null elements.
2020
* <p>
21-
* All method calls (of abstract and default methods existing in JDK 8) are forwarded to <b>the same method</b> on the
22-
* wrapped collection. This implies that all guarantees made by such methods (e.g. regarding atomicity) are upheld by
23-
* the transformation.
24-
* <p>
2521
* If the {@link #stream() stream} returned by this collection is told to {@link java.util.stream.Stream#sorted() sort}
2622
* itself, it will do so on the base of the comparator returned by the inner collection's spliterator (e.g. based on the
2723
* natural order of {@code I} if it has one).

src/main/java/org/codefx/libfx/collection/transform/TransformingList.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
* transformation {@code null -> null}. The transforming functions specified during construction neither have to handle
1919
* that case nor are they allowed to produce null elements.
2020
* <p>
21-
* All method calls (of abstract and default methods existing in JDK 8) are forwarded to <b>the same method</b> on the
22-
* wrapped list. This implies that all guarantees made by such methods (e.g. regarding atomicity) are upheld by the
23-
* transformation.
24-
* <p>
2521
* If the {@link #stream() stream} returned by this list is told to {@link java.util.stream.Stream#sorted() sort}
2622
* itself, it will do so on the base of the comparator returned by the inner list's spliterator (e.g. based on the
2723
* natural order of {@code O} if it has one).

src/main/java/org/codefx/libfx/collection/transform/TransformingMap.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
* the transformation {@code null -> null}. The transforming functions specified during construction neither have to
1919
* handle that case nor are they allowed to produce null elements.
2020
* <p>
21-
* All method calls (of abstract and default methods existing in JDK 8) are forwarded to <b>the same method</b> on the
22-
* wrapped map. This implies that all guarantees made by such methods (e.g. regarding atomicity) are upheld by the
23-
* transformation.
24-
* <p>
2521
* If the {@link java.util.stream.Stream streams} returned by this map's views are told to
2622
* {@link java.util.stream.Stream#sorted() sort} themself, they will do so on the base of the comparator returned by the
2723
* inner map view's spliterator (e.g. based on the natural order of {@code IK} or {@code IV} if it has one).

src/main/java/org/codefx/libfx/collection/transform/TransformingSet.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
* transformation {@code null -> null}. The transforming functions specified during construction neither have to handle
1919
* that case nor are they allowed to produce null elements.
2020
* <p>
21-
* All method calls (of abstract and default methods existing in JDK 8) are forwarded to <b>the same method</b> on the
22-
* wrapped set. This implies that all guarantees made by such methods (e.g. regarding atomicity) are upheld by the
23-
* transformation.
24-
* <p>
2521
* If the {@link #stream() stream} returned by this set is told to {@link java.util.stream.Stream#sorted() sort} itself,
2622
* it will do so on the base of the comparator returned by the inner sets's spliterator (e.g. based on the natural order
2723
* of {@code I} if it has one).

src/main/java/org/codefx/libfx/collection/transform/package-info.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@
1212
* the <i>inner type</i>. The transforming collection and its generic type are referred to as <i>outer collection</i>
1313
* and <i>outer type</i>, respectively.
1414
* </p>
15-
* <h2>Details</h2> <h3>Transformation</h3>
15+
* <h2>Details</h2>
16+
* <p>
17+
* The following details are important to use transforming collections without unexpected problems.
18+
* </p>
19+
* <h3>Forwarding</h3>
20+
* <p>
21+
* Unless otherwise noted the views forward all method calls (of abstract and default methods existing in JDK 8) to
22+
* <b>the same method</b> on the inner collection. This implies that all guarantees made by such methods (e.g. regarding
23+
* atomicity) are upheld by the transformation.
24+
* </p>
25+
* <h3>Transformation</h3>
1626
* <p>
1727
* The transformation is computed with a pair of functions. One is used to transform outer elements to inner elements
1828
* and another one for the other direction. In the case of a {@link java.util.Map Map} two such pairs exist: one for

0 commit comments

Comments
 (0)