Fix javadoc errors in Functions.java
This commit is contained in:
parent
f12cfc8d4e
commit
fc6a392b7c
|
@ -28,7 +28,7 @@ import java.lang.reflect.UndeclaredThrowableException;
|
||||||
* not to throw Exceptions, at least not checked Exceptions, aka instances of
|
* not to throw Exceptions, at least not checked Exceptions, aka instances of
|
||||||
* {@link Exception}. This enforces the use of constructs like
|
* {@link Exception}. This enforces the use of constructs like
|
||||||
* <pre>
|
* <pre>
|
||||||
* Consumer<java.lang.reflect.Method> consumer = (m) -> {
|
* Consumer<java.lang.reflect.Method> consumer = (m) -> {
|
||||||
* try {
|
* try {
|
||||||
* m.invoke(o, args);
|
* m.invoke(o, args);
|
||||||
* } catch (Throwable t) {
|
* } catch (Throwable t) {
|
||||||
|
@ -36,11 +36,11 @@ import java.lang.reflect.UndeclaredThrowableException;
|
||||||
* }
|
* }
|
||||||
* };
|
* };
|
||||||
* </pre>
|
* </pre>
|
||||||
* By replacing a {@link Consumer Consumer<O>} with a
|
* By replacing a {@link java.util.function.Consumer Consumer<O>} with a
|
||||||
* {@link FailableConsumer FailableConsumer<O,? extends Throwable}, this can be
|
* {@link FailableConsumer FailableConsumer<O,? extends Throwable>}, this can be
|
||||||
* written like follows:
|
* written like follows:
|
||||||
* <pre>
|
* <pre>
|
||||||
* Functions.accept((m) -> m.invoke(o,args));
|
* Functions.accept((m) -> m.invoke(o,args));
|
||||||
* </pre>
|
* </pre>
|
||||||
* Obviously, the second version is much more concise and the spirit of
|
* Obviously, the second version is much more concise and the spirit of
|
||||||
* Lambda expressions is met better than the second version.
|
* Lambda expressions is met better than the second version.
|
||||||
|
@ -265,7 +265,7 @@ public class Functions {
|
||||||
* {@link Throwable} is rethrown. Example use:
|
* {@link Throwable} is rethrown. Example use:
|
||||||
* <pre>
|
* <pre>
|
||||||
* final FileInputStream fis = new FileInputStream("my.file");
|
* final FileInputStream fis = new FileInputStream("my.file");
|
||||||
* Functions.tryWithResources(useInputStream(fis), null, () -> fis.close());
|
* Functions.tryWithResources(useInputStream(fis), null, () -> fis.close());
|
||||||
* </pre>
|
* </pre>
|
||||||
* @param pAction The action to execute. This object <em>will</em> always
|
* @param pAction The action to execute. This object <em>will</em> always
|
||||||
* be invoked.
|
* be invoked.
|
||||||
|
@ -330,7 +330,7 @@ public class Functions {
|
||||||
* {@link Throwable} is rethrown. Example use:
|
* {@link Throwable} is rethrown. Example use:
|
||||||
* <pre>
|
* <pre>
|
||||||
* final FileInputStream fis = new FileInputStream("my.file");
|
* final FileInputStream fis = new FileInputStream("my.file");
|
||||||
* Functions.tryWithResources(useInputStream(fis), () -> fis.close());
|
* Functions.tryWithResources(useInputStream(fis), () -> fis.close());
|
||||||
* </pre>
|
* </pre>
|
||||||
* @param pAction The action to execute. This object <em>will</em> always
|
* @param pAction The action to execute. This object <em>will</em> always
|
||||||
* be invoked.
|
* be invoked.
|
||||||
|
|
Loading…
Reference in New Issue