Use Javadoc @code
This commit is contained in:
parent
9345437e0f
commit
16bce45fec
|
@ -53,7 +53,7 @@ import org.apache.commons.lang3.Functions.FailablePredicate;
|
|||
* }</pre>
|
||||
* Using a {@link FailableStream}, this can be rewritten as follows:
|
||||
* <pre>{@code
|
||||
* Streams.failable(stream).forEach((m) -> m.invoke(o, args));
|
||||
* Streams.failable(stream).forEach(m -> m.invoke(o, args));
|
||||
* }</pre>
|
||||
* Obviously, the second version is much more concise and the spirit of
|
||||
* Lambda expressions is met better than in the first version.
|
||||
|
|
|
@ -49,8 +49,8 @@ import org.apache.commons.lang3.function.FailablePredicate;
|
|||
* attempts to address the fact that lambdas are supposed not to throw Exceptions, at least not checked Exceptions, AKA instances of {@link Exception}. This
|
||||
* enforces the use of constructs like:
|
||||
*
|
||||
* <pre>
|
||||
* Consumer<java.lang.reflect.Method> consumer = m -> {
|
||||
* <pre>{@code
|
||||
* Consumer<java.lang.reflect.Method> consumer = m -> {
|
||||
* try {
|
||||
* m.invoke(o, args);
|
||||
* } catch (Throwable t) {
|
||||
|
@ -58,14 +58,14 @@ import org.apache.commons.lang3.function.FailablePredicate;
|
|||
* }
|
||||
* };
|
||||
* stream.forEach(consumer);
|
||||
* </pre>
|
||||
* }</pre>
|
||||
* <p>
|
||||
* Using a {@link FailableStream}, this can be rewritten as follows:
|
||||
* </p>
|
||||
*
|
||||
* <pre>
|
||||
* Streams.failable(stream).forEach(m -> m.invoke(o, args));
|
||||
* </pre>
|
||||
* <pre>{@code
|
||||
* Streams.failable(stream).forEach(m -> m.invoke(o, args));
|
||||
* }</pre>
|
||||
* <p>
|
||||
* Obviously, the second version is much more concise and the spirit of Lambda expressions is met better than in the first version.
|
||||
* </p>
|
||||
|
|
Loading…
Reference in New Issue