Skip to content

Commit b797968

Browse files
committed
Fix javadoc warnings.
1 parent 4c93bae commit b797968

File tree

15 files changed

+96
-85
lines changed

15 files changed

+96
-85
lines changed

core/src/main/java/fj/Function.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -778,47 +778,47 @@ public static <A, B> F<B, A> join(final F<B, F<B, A>> f) {
778778

779779
/**
780780
* Partial application of the second argument to the supplied function to get a function of type
781-
* <tt>A -> C</tt>. Same as <tt>flip(f).f(b)</tt>.
781+
* {@code A -> C}. Same as {@code flip(f).f(b)}.
782782
*
783783
* @param f The function to partially apply.
784784
* @param b The value to apply to the function.
785-
* @return A new function based on <tt>f</tt> with its second argument applied.
785+
* @return A new function based on {@code f} with its second argument applied.
786786
*/
787787
public static <A, B, C> F<A, C> partialApply2(final F<A, F<B, C>> f, final B b) {
788788
return a -> uncurryF2(f).f(a, b);
789789
}
790790

791791
/**
792792
* Partial application of the third argument to the supplied function to get a function of type
793-
* <tt>A -> B -> D</tt>.
793+
* {@code A -> B -> D}.
794794
*
795795
* @param f The function to partially apply.
796796
* @param c The value to apply to the function.
797-
* @return A new function based on <tt>f</tt> with its third argument applied.
797+
* @return A new function based on {@code f} with its third argument applied.
798798
*/
799799
public static <A, B, C, D> F<A, F<B, D>> partialApply3(final F<A, F<B, F<C, D>>> f, final C c) {
800800
return a -> b -> uncurryF3(f).f(a, b, c);
801801
}
802802

803803
/**
804804
* Partial application of the fourth argument to the supplied function to get a function of type
805-
* <tt>A -> B -> C -> E</tt>.
805+
* {@code A -> B -> C -> E}.
806806
*
807807
* @param f The function to partially apply.
808808
* @param d The value to apply to the function.
809-
* @return A new function based on <tt>f</tt> with its fourth argument applied.
809+
* @return A new function based on {@code f} with its fourth argument applied.
810810
*/
811811
public static <A, B, C, D, E> F<A, F<B, F<C, E>>> partialApply4(final F<A, F<B, F<C, F<D, E>>>> f, final D d) {
812812
return a -> b -> c -> uncurryF4(f).f(a, b, c, d);
813813
}
814814

815815
/**
816816
* Partial application of the fifth argument to the supplied function to get a function of type
817-
* <tt>A -> B -> C -> D -> F$</tt>.
817+
* {@code A -> B -> C -> D -> F$}.
818818
*
819819
* @param f The function to partially apply.
820820
* @param e The value to apply to the function.
821-
* @return A new function based on <tt>f</tt> with its fifth argument applied.
821+
* @return A new function based on {@code f} with its fifth argument applied.
822822
*/
823823
public static <A, B, C, D, E, F$> F<A, F<B, F<C, F<D, F$>>>> partialApply5(final F<A, F<B, F<C, F<D, F<E, F$>>>>> f,
824824
final E e) {
@@ -827,11 +827,11 @@ public static <A, B, C, D, E> F<A, F<B, F<C, E>>> partialApply4(final F<A, F<B,
827827

828828
/**
829829
* Partial application of the sixth argument to the supplied function to get a function of type
830-
* <tt>A -> B -> C -> D -> E -> G</tt>.
830+
* {@code A -> B -> C -> D -> E -> G}.
831831
*
832832
* @param f The function to partially apply.
833833
* @param f$ The value to apply to the function.
834-
* @return A new function based on <tt>f</tt> with its sixth argument applied.
834+
* @return A new function based on {@code f} with its sixth argument applied.
835835
*/
836836
public static <A, B, C, D, E, F$, G> F<A, F<B, F<C, F<D, F<E, G>>>>> partialApply6(
837837
final F<A, F<B, F<C, F<D, F<E, F<F$, G>>>>>> f, final F$ f$) {
@@ -840,11 +840,11 @@ public static <A, B, C, D, E> F<A, F<B, F<C, E>>> partialApply4(final F<A, F<B,
840840

841841
/**
842842
* Partial application of the seventh argument to the supplied function to get a function of type
843-
* <tt>A -> B -> C -> D -> E -> F$ -> H</tt>.
843+
* {@code A -> B -> C -> D -> E -> F$ -> H}.
844844
*
845845
* @param f The function to partially apply.
846846
* @param g The value to apply to the function.
847-
* @return A new function based on <tt>f</tt> with its seventh argument applied.
847+
* @return A new function based on {@code f} with its seventh argument applied.
848848
*/
849849
public static <A, B, C, D, E, F$, G, H> F<A, F<B, F<C, F<D, F<E, F<F$, H>>>>>> partialApply7(
850850
final F<A, F<B, F<C, F<D, F<E, F<F$, F<G, H>>>>>>> f, final G g) {
@@ -853,11 +853,11 @@ public static <A, B, C, D, E> F<A, F<B, F<C, E>>> partialApply4(final F<A, F<B,
853853

854854
/**
855855
* Partial application of the eigth argument to the supplied function to get a function of type
856-
* <tt>A -> B -> C -> D -> E -> F$ -> G -> I</tt>.
856+
* {@code A -> B -> C -> D -> E -> F$ -> G -> I}.
857857
*
858858
* @param f The function to partially apply.
859859
* @param h The value to apply to the function.
860-
* @return A new function based on <tt>f</tt> with its eigth argument applied.
860+
* @return A new function based on {@code f} with its eigth argument applied.
861861
*/
862862
public static <A, B, C, D, E, F$, G, H, I> F<A, F<B, F<C, F<D, F<E, F<F$, F<G, I>>>>>>> partialApply8(
863863
final F<A, F<B, F<C, F<D, F<E, F<F$, F<G, F<H, I>>>>>>>> f, final H h) {

core/src/main/java/fj/Monoid.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public A zero() {
246246
/**
247247
* Returns a value summed <code>n</code> times (<code>a + a + ... + a</code>).
248248
* The default definition uses peasant multiplication, exploiting
249-
* associativity to only require `O(log n)` uses of
249+
* associativity to only require {@code O(log n)} uses of
250250
* {@link #sum(Object, Object)}.
251251
*
252252
* @param n multiplier

core/src/main/java/fj/Semigroup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public F<A, F<A, A>> sum() {
134134
/**
135135
* Returns a value summed <code>n + 1</code> times (
136136
* <code>a + a + ... + a</code>) The default definition uses peasant
137-
* multiplication, exploiting associativity to only require `O(log n)` uses of
137+
* multiplication, exploiting associativity to only require {@code O(log n)} uses of
138138
* {@link #sum(Object, Object)}.
139139
*
140140
* @param n multiplier

core/src/main/java/fj/control/Trampoline.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public <R> R fold(final F<Normal<A>, R> n,
4343
return gs.f(this);
4444
}
4545

46-
// The monadic bind constructs a new Codense whose subcomputation is still `sub`, and Kleisli-composes the
46+
// The monadic bind constructs a new Codense whose subcomputation is still {@code sub}, and Kleisli-composes the
4747
// continuations.
4848
public <B> Trampoline<B> bind(final F<A, Trampoline<B>> f) {
4949
return codense(sub, o -> suspend(() -> cont.f(o).bind(f)));
@@ -110,7 +110,7 @@ private static <A, B> Codense<B> codense(final Normal<A> a, final F<A, Trampolin
110110
}
111111

112112
/**
113-
* @return The first-class version of `pure`.
113+
* @return The first-class version of {@code pure}.
114114
*/
115115
public static <A> F<A, Trampoline<A>> pure() {
116116
return Trampoline::pure;
@@ -148,7 +148,7 @@ public static <A> Trampoline<A> suspend(final P1<Trampoline<A>> a) {
148148

149149

150150
/**
151-
* @return The first-class version of `suspend`.
151+
* @return The first-class version of {@code suspend}.
152152
*/
153153
public static <A> F<P1<Trampoline<A>>, Trampoline<A>> suspend_() {
154154
return Trampoline::suspend;
@@ -175,21 +175,21 @@ public final <B> Trampoline<B> map(final F<A, B> f) {
175175
}
176176

177177
/**
178-
* @return The first-class version of `bind`.
178+
* @return The first-class version of {@code bind}.
179179
*/
180180
public static <A, B> F<F<A, Trampoline<B>>, F<Trampoline<A>, Trampoline<B>>> bind_() {
181181
return f -> a -> a.bind(f);
182182
}
183183

184184
/**
185-
* @return The first-class version of `map`.
185+
* @return The first-class version of {@code map}.
186186
*/
187187
public static <A, B> F<F<A, B>, F<Trampoline<A>, Trampoline<B>>> map_() {
188188
return f -> a -> a.map(f);
189189
}
190190

191191
/**
192-
* @return The first-class version of `resume`.
192+
* @return The first-class version of {@code resume}.
193193
*/
194194
public static <A> F<Trampoline<A>, Either<P1<Trampoline<A>>, A>> resume_() {
195195
return Trampoline::resume;

core/src/main/java/fj/data/Enumerator.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@
1818

1919
/**
2020
* Abstracts over a type that may have a successor and/or predecessor value. This implies ordering for that type. A user
21-
* may construct an enumerator with an optimised version for <code>plus</code>, otherwise a default is implemented using
21+
* may construct an enumerator with an optimised version for {@code plus}, otherwise a default is implemented using
2222
* the given successor/predecessor implementations.
2323
* <p/>
2424
* For any enumerator e, the following laws must satisfy:
2525
* <ul>
26-
* <li>forall a. e.successor(a).forall(\t -> e.predecessor(t).forall(\z -> z == a))</li>
27-
* <li>forall a. e.predecessor(a).forall(\t -> e.successor(t).forall(\z -> z == a))</li>
28-
* <li>e.max().forall(\t -> e.successor(t).isNone)</li>
29-
* <li>e.min().forall(\t -> e.predecessor(t).isNone)</li>
30-
* <li>forall a n. e.plus(a, 0) == Some(a)</li>
31-
* <li>forall a n | n > 0. e.plus(a, n) == e.plus(a, n - 1)</li>
32-
* <li>forall a n | n < 0. e.plus(a, n) == e.plus(a, n + 1)</li>
26+
* <li>{@code forall a. e.successor(a).forall(\t -> e.predecessor(t).forall(\z -> z == a))}</li>
27+
* <li>{@code forall a. e.predecessor(a).forall(\t -> e.successor(t).forall(\z -> z == a))}</li>
28+
* <li>{@code e.max().forall(\t -> e.successor(t).isNone)}</li>
29+
* <li>{@code e.min().forall(\t -> e.predecessor(t).isNone)}</li>
30+
* <li>{@code forall a n. e.plus(a, 0) == Some(a)}</li>
31+
* <li>{@code forall a n | n > 0. e.plus(a, n) == e.plus(a, n - 1)}</li>
32+
* <li>{@code forall a n | n < 0. e.plus(a, n) == e.plus(a, n + 1)}</li>
3333
* </ul>
3434
*
3535
* @version %build.number%

core/src/main/java/fj/data/Tree.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,10 @@ public Stream<A> f(final Tree<A> t, final P1<Stream<A>> xs) {
134134
}
135135

136136
/**
137+
* <pre>{@code
137138
* flatten :: Tree a -> [a]
138139
* flatten t = squish t []
140+
* }</pre>
139141
* where squish (Node x ts) xs = x:Prelude.foldr squish xs ts
140142
* Puts the elements of the tree into a Stream, in pre-order.
141143
*
@@ -346,4 +348,4 @@ public int length() {
346348
return 1 + subForest._1().map(Tree::length).foldLeft((acc, i) -> acc + i, 0);
347349
}
348350

349-
}
351+
}

core/src/main/java/fj/data/hlist/HPre.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static HFalse hFalse() {
5757
}
5858

5959
/**
60-
* Type-level boolean conjunction. A value of this type represents evidence that AB -> C
60+
* Type-level boolean conjunction. A value of this type represents evidence that {@code AB -> C}
6161
*
6262
* @param <A> A boolean
6363
* @param <B> A boolean
@@ -92,7 +92,7 @@ public static HAnd<HTrue, HTrue, HTrue> hAnd(final HTrue a, final HTrue b) {
9292
}
9393

9494
/**
95-
* Type-level boolean disjunction. A value of this type represents evidence that A+B -> C
95+
* Type-level boolean disjunction. A value of this type represents evidence that {@code A+B -> C}
9696
*
9797
* @param <A> A boolean
9898
* @param <B> A boolean

core/src/main/java/fj/data/optic/Iso.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ public static <S, A> Iso<S, A> iso(final F<S, A> get, final F<A, S> reverseGet)
119119
* create an {@link Iso} between any type and itself. id is the zero element of optics composition, for all optics o of type O
120120
* (e.g. Lens, Iso, Prism, ...):
121121
*
122-
* <pre>
122+
* <pre>{@code
123123
* o composeIso Iso.id == o
124124
* Iso.id composeO o == o
125-
* </pre>
125+
* }</pre>
126126
*
127127
* (replace composeO by composeLens, composeIso, composePrism, ...)
128128
*/

core/src/main/java/fj/data/optic/PIso.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,26 @@
2121
/**
2222
* A {@link PIso} defines an isomorphism between types S, A and B, T:
2323
*
24-
* <pre>
24+
* <pre>{@code
2525
* get reverse.get
2626
* --------------------> -------------------->
2727
* S A T B
2828
* <-------------------- <--------------------
2929
* reverse.reverseGet reverseGet
30-
* </pre>
30+
* }</pre>
3131
*
32-
* In addition, if f and g forms an isomorphism between `A` and `B`, i.e. if `f . g = id` and `g . f = id`, then a {@link PIso}
33-
* defines an isomorphism between `S` and `T`:
32+
* In addition, if f and g forms an isomorphism between {@code A} and {@code B}, i.e. if {@code f . g = id} and {@code g . f = id}, then a {@link PIso}
33+
* defines an isomorphism between {@code S} and {@code T}:
3434
*
35-
* <pre>
35+
* <pre>{@code
3636
* S T S T
3737
* | | | |
3838
* | | | |
3939
* get | | reverseGet reverse.reverseGet | | reverse.get
4040
* | | | |
4141
* | f | | g |
4242
* A --------> B A <-------- B
43-
* </pre>
43+
* }</pre>
4444
*
4545
* A {@link PIso} is also a valid {@link Getter}, {@link Fold}, {@link PLens}, {@link PPrism}, {@link POptional},
4646
* {@link PTraversal} and {@link PSetter}
@@ -552,10 +552,10 @@ public PIso<S, T, A, B> reverse() {
552552
* create a {@link PIso} between any type and itself. id is the zero element of optics composition, for all optics o of type O
553553
* (e.g. Lens, Iso, Prism, ...):
554554
*
555-
* <pre>
555+
* <pre>{@code
556556
* o composeIso Iso.id == o
557557
* Iso.id composeO o == o
558-
* </pre>
558+
* }</pre>
559559
*
560560
* (replace composeO by composeLens, composeIso, composePrism, ...)
561561
*/

core/src/main/java/fj/data/optic/PLens.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@
1717
import fj.data.vector.V2;
1818

1919
/**
20-
* A {@link PLens} can be seen as a pair of functions: - `get: S => A` i.e. from an `S`, we can extract an `A` - `set: (B, S) =>
21-
* T` i.e. if we replace an `A` by a `B` in an `S`, we obtain a `T`
22-
*
23-
* A {@link PLens} could also be defined as a weaker {@link PIso} where set requires an additional parameter than reverseGet.
24-
*
25-
* {@link PLens} stands for Polymorphic Lens as it set and modify methods change a type `A` to `B` and `S` to `T`. {@link Lens}
26-
* is a {@link PLens} restricted to monomoprhic updates.
27-
*
28-
* A {@link PLens} is also a valid {@link Getter}, {@link Fold}, {@link POptional}, {@link PTraversal} and {@link PSetter}
29-
*
20+
* A {@link PLens} can be seen as a pair of functions:<ul>
21+
* <li>{@code get: S => A} i.e. from an {@code S}, we can extract an {@code A}</li>
22+
* <li>{@code set: (B, S) => T} i.e. if we replace an {@code A} by a {@code B} in an {@code S}, we obtain a {@code T}</li>
23+
* </ul>
24+
* <p>
25+
* A {@link PLens} could also be defined as a weaker {@link PIso} where set requires an additional parameter than reverseGet.</p>
26+
* <p>
27+
* {@link PLens} stands for Polymorphic Lens as it set and modify methods change a type {@code A} to {@code B} and {@code S} to {@code T}. {@link Lens}
28+
* is a {@link PLens} restricted to monomoprhic updates.</p>
29+
* <p>
30+
* A {@link PLens} is also a valid {@link Getter}, {@link Fold}, {@link POptional}, {@link PTraversal} and {@link PSetter}</p>
31+
* <p>
3032
* Typically a {@link PLens} or {@link Lens} can be defined between a Product (e.g. case class, tuple, HList) and one of it is
31-
* component.
33+
* component.</p>
3234
*
3335
* @param <S> the source of a {@link PLens}
3436
* @param <T> the modified source of a {@link PLens}
@@ -500,4 +502,4 @@ public F<S, T> modify(final F<A, B> f) {
500502
}
501503
};
502504
}
503-
}
505+
}

0 commit comments

Comments
 (0)