[LANG-1568] Javadoc.

This commit is contained in:
Gary Gregory 2020-06-25 13:57:28 -04:00
parent 268d4936d4
commit b69c4759ed
1 changed files with 12 additions and 23 deletions

View File

@ -41,16 +41,13 @@ import org.apache.commons.lang3.stream.Streams.FailableStream;
* constructs like: * constructs like:
* *
* <pre> * <pre>
* { * Consumer&lt;java.lang.reflect.Method-&gt; consumer = (m) -&gt; {
* &#64;code
* Consumer<java.lang.reflect.Method> consumer = (m) -> {
* try { * try {
* m.invoke(o, args); * m.invoke(o, args);
* } catch (Throwable t) { * } catch (Throwable t) {
* throw Failable.rethrow(t); * throw Failable.rethrow(t);
* } * }
* }; * };
* }
* </pre> * </pre>
* *
* <p> * <p>
@ -59,9 +56,7 @@ import org.apache.commons.lang3.stream.Streams.FailableStream;
* </p> * </p>
* *
* <pre> * <pre>
* {@code * Functions.accept((m) -&gt; m.invoke(o, args));
* Functions.accept((m) -> m.invoke(o,args));
* }
* </pre> * </pre>
* *
* <p> * <p>
@ -490,11 +485,8 @@ public class Failable {
* {@link Throwable} is rethrown. Example use: * {@link Throwable} is rethrown. Example use:
* *
* <pre> * <pre>
* {
* &#64;code
* 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, () -&gt; fis.close());
* }
* </pre> * </pre>
* *
* @param action The action to execute. This object <em>will</em> always be invoked. * @param action The action to execute. This object <em>will</em> always be invoked.
@ -553,11 +545,8 @@ public class Failable {
* {@link Throwable} is rethrown. Example use: * {@link Throwable} is rethrown. Example use:
* *
* <pre> * <pre>
* {
* &#64;code
* final FileInputStream fis = new FileInputStream("my.file"); * final FileInputStream fis = new FileInputStream("my.file");
* Functions.tryWithResources(useInputStream(fis), () -> fis.close()); * Functions.tryWithResources(useInputStream(fis), () -&gt; fis.close());
* }
* </pre> * </pre>
* *
* @param action The action to execute. This object <em>will</em> always be invoked. * @param action The action to execute. This object <em>will</em> always be invoked.