Skip to content

Commit

Permalink
Fix javadoc html errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Isammoc committed May 19, 2018
1 parent 661fb8a commit 62e1fa4
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 68 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/cactoos/io/Zip.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@

/**
* Zip files and directory.
* <p>
* <p>There is no thread-safety guarantee.
* <br>
* <br>There is no thread-safety guarantee.
*
* @since 0.29
*/
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/cactoos/scalar/AndWithIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* {@link java.util.stream.Stream#forEach(java.util.function.Consumer)}
* works, but with an index provided for each item:</p>
*
* <pre>
* <pre>{@code
* new UncheckedScalar<>(
* new AndWithIndex(
* new IterableOf<>("Mary", "John", "William", "Napkin"),
Expand All @@ -50,8 +50,8 @@
* )
* ).value();
* // will print "| idx #0: name: Mary | idx #1: name: John |
* idx #2: name: William | idx #3: name: Napkin " to console
* </pre>
* // idx #2: name: William | idx #3: name: Napkin " to console
* }</pre>
*
* <p>This class implements {@link Scalar}, which throws a checked
* {@link Exception}. This may not be convenient in many cases. To make
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/org/cactoos/scalar/Constant.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@
* {@link Exception}. Despite that this class does NOT throw a checked
* exception as it only returns a pre-computed value.</p>
*
* <p>Example:
* <pre>
* final Scalar&lt;String&gt; constant = new Constant&lg;&gt;("Value");
* <p>Example:</p>
* <pre>{@code
* final Scalar<String> constant = new Constant<>("Value");
* System.out.print("Constant is always the same: ");
* System.out.println(constant.value() == constant.value());
* </pre>
* </p>
* }</pre>
*
* <p>This class is thread-safe.</p>
*
Expand Down
40 changes: 20 additions & 20 deletions src/main/java/org/cactoos/scalar/Reduced.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,34 @@
/**
* Reduces iterable via BiFunc.
*
* <pre>
* <pre>{@code
* new Reduced<>(
* (first, last) -> first + last,
* new IterableOf<>(() -> 1L, () -> 2L, () -> 3L, () -> 4L)
* ).value() // returns 10L
* </pre>
* }</pre>
*
* <p>Here is how you can use it to
* find one of items according to the specified {@link BiFunc}:</p>
*
* <pre>
* final String apple = new Reduced&lt;&gt;(
* (first, last) -&gt; first,
* new IterableOf&lt;Scalar&lt;String&gt;&gt;(
* () -&gt; "Apple",
* () -&gt; "Banana",
* () -&gt; "Orange"
* )
* ).value();
* final String orange = new Reduced&lt;&gt;(
* (first, last) -&gt; last,
* new IterableOf&lt;Scalar&lt;String&gt;&gt;(
* () -&gt; "Apple",
* () -&gt; "Banana",
* () -&gt; "Orange"
* )
* ).value();
* </pre>
* <pre>{@code
* final String apple = new Reduced<>(
* (first, last) -> first,
* new IterableOf<Scalar<String>>(
* () -> "Apple",
* () -> "Banana",
* () -> "Orange"
* )
* ).value();
* final String orange = new Reduced<>(
* (first, last) -> last,
* new IterableOf<Scalar<String>>(
* () -> "Apple",
* () -> "Banana",
* () -> "Orange"
* )
* ).value();
* }</pre>
*
* <p>There is no thread-safety guarantee.
*
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/cactoos/scalar/RetryScalar.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@
/**
* Func that will try a few times before throwing an exception.
*
* <pre>
* <pre>{@code
* new RetryScalar<>(
* () -> {
* if (new SecureRandom().nextDouble() > 0.3d) {
* throw new IllegalArgumentException("May happen");
* }
* return 0;
* throw new IllegalArgumentException("May happen");
* }
* return 0;
* },
* 5
* ).value() // will try to run 5 times before throwing an exception
* </pre>
* }</pre>
*
* <p>There is no thread-safety guarantee.
*
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/cactoos/scalar/StickyScalar.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
* it more convenient and get rid of the checked exception you can
* use {@link UncheckedScalar} or {@link IoCheckedScalar} decorators.</p>
*
* <pre>
* final Scalar&lt;Integer&gt; scalar = new StickyScalar<>(
* <pre>{@code
* final Scalar<Integer> scalar = new StickyScalar<>(
* () -> {
* System.out.println("Will be printed only once");
* return new SecureRandom().nextInt();
* }
* ).value()
* </pre>
* }</pre>
*
* <p>There is no thread-safety guarantee.
*
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/cactoos/scalar/SumOfDoubleScalar.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
*
* <p>Here is how you can use it to summarize double numbers:</p>
*
* <pre>
* <pre>{@code
* double sum = new SumOfDoubleScalar(() -> 1.1,() -> 2.1, () -> 3.1).value();
* </pre>
* }</pre>
*
* <p>This class implements {@link Scalar}, which throws a checked
* {@link Exception}. This may not be convenient in many cases. To make
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/cactoos/scalar/SumOfFloatScalar.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
*
* <p>Here is how you can use it to summarize float numbers:</p>
*
* <pre>
* <pre>{@code
* float sum = new SumOfFloatScalar(() -> 1f,() -> 2f, () -> 3f).value();
* </pre>
* }</pre>
*
* <p>This class implements {@link Scalar}, which throws a checked
* {@link Exception}. This may not be convenient in many cases. To make
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/org/cactoos/scalar/SumOfIntScalar.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
*
* <p>Here is how you can use it to summarize numbers:</p>
*
* <pre>
* int sum = new SumOfIntScalar(() -> 1,() -> 2, () -> 3).value(); //equal to 6
* </pre>
* <pre>{@code
* int sum = new SumOfIntScalar(() -> 1,() -> 2, () -> 3).value();
* // sum equal to 6
* }</pre>
*
* <p>This class implements {@link Scalar}, which throws a checked
* {@link Exception}. This may not be convenient in many cases. To make
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/cactoos/scalar/SumOfLongScalar.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
*
* <p>Here is how you can use it to summarize numbers:</p>
*
* <pre>
* <pre>{@code
* long sum = new SumOfLongScalar(() -> 1,() -> 2, () -> 3).value();
* </pre>
* }</pre>
*
* <p>This class implements {@link Scalar}, which throws a checked
* {@link Exception}. This may not be convenient in many cases. To make
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/cactoos/scalar/SyncScalar.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
* it more convenient and get rid of the checked exception you can
* use {@link UncheckedScalar} or {@link IoCheckedScalar} decorators.</p>
*
* <pre>
* final List&lt;Integer&gt; list = new LinkedList<>();
* <pre>{@code
* final List<Integer> list = new LinkedList<>();
* final int threads = 100;
* new RunsInThreads<>(
* new SyncScalar<>(() -> list.add(1)), threads
* ); // list.size() will be equal to threads value
* </pre>
* }</pre>
*
* <p>Objects of this class are thread-safe.</p>
*
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/cactoos/scalar/Ternary.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
* it more convenient and get rid of the checked exception you can
* use {@link UncheckedScalar} or {@link IoCheckedScalar} decorators.</p>
*
* <pre>
* <pre>{@code
* new Ternary<>(
* 5,
* input -> input > 3,
* input -> input = 8,
* input -> input = 2
* ).value() // will be equal to 8
* </pre>
* }</pre>
*
* @param <T> Type of item.
* @since 0.8
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/org/cactoos/text/ComparableText.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
/**
* Text implementing Comparable.<br>
* Below the example how you can sort words in a string:
* <pre>
* Iterable&lt;Text> sorted = new Sorted<>(
* new Mapped<>(
* ComparableText::new,
* new SplitText("The quick brown fox jumps over the lazy dog", " ")
* )
* <pre>{@code
* Iterable<Text> sorted = new Sorted<>(
* new Mapped<>(
* ComparableText::new,
* new SplitText("The quick brown fox jumps over the lazy dog", " ")
* )
* )
* </pre>
* }</pre>
*
* <p>There is no thread-safety guarantee.
*
Expand Down
16 changes: 7 additions & 9 deletions src/main/java/org/cactoos/text/ReplacedText.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,13 @@ public ReplacedText(
* {@link Matcher#find() matching} substring.
* <p>
* Example usage:
* <pre>
* {@code
* final String result = new ReplacedText(
* new TextOf("one two THREE four FIVE six"),
* () -> Pattern.compile("[a-z]+"),
* matcher -> String.valueOf(matcher.group().length())
* ).asString(); //will return the string "3 3 THREE 4 FIVE 3"
* }
* </pre>
* <pre>{@code
* final String result = new ReplacedText(
* new TextOf("one two THREE four FIVE six"),
* () -> Pattern.compile("[a-z]+"),
* matcher -> String.valueOf(matcher.group().length())
* ).asString(); //will return the string "3 3 THREE 4 FIVE 3"
* }</pre>
* <p>
* Note: a {@link PatternSyntaxException} will be thrown if the
* regular expression's syntax is invalid.
Expand Down

0 comments on commit 62e1fa4

Please sign in to comment.