Skip to content

Commit

Permalink
javadoc tidy-up
Browse files Browse the repository at this point in the history
  • Loading branch information
earcam authored and earcam committed Jan 1, 2018
1 parent 92c823d commit 92a253c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 0 additions & 2 deletions src/main/java/io/earcam/unexceptional/CheckedComparator.java
Expand Up @@ -166,8 +166,6 @@ public default CheckedComparator<T> thenComparingDouble(CheckedToDoubleFunction<
/**
* See {@link java.util.Comparator#comparing(java.util.function.Function, Comparator)}
*
* @return the chained {@link CheckedComparator}
*
* @param <T> the type of element to be compared
* @param <U> the type of the sort key
*
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/earcam/unexceptional/CheckedFunction.java
Expand Up @@ -86,7 +86,8 @@ public default <V> CheckedFunction<T, V> andThen(CheckedFunction<? super R, ? ex

/**
* See {@link java.util.function.Function#identity()}
*
*
* @param <T> argument and return type
* @return the argument as given
*
* @since 0.3.0
Expand Down
12 changes: 5 additions & 7 deletions src/main/java/io/earcam/unexceptional/Closing.java
Expand Up @@ -27,7 +27,7 @@
/**
* <p>
* Succinctly handle {@link AutoCloseable}s that throw checked {@link Exception}s.
* <p>
* </p>
*
* <p>
* There are two families of static methods; {@code closeAfterApplying(...)} and {@code closeAfterAccepting(...)}, the
Expand All @@ -36,9 +36,6 @@
* </p>
*
* <p>
* </p>
*
* <p>
* <b>Example</b>: this zero-branch, single-instruction, one-liner will find a free port number:
* </p>
*
Expand All @@ -49,14 +46,15 @@
* <p>
* <b>Motivation</b>: I/O stream instances typically (and necessarily) requires handling a lot of possible
* {@link IOException}s - by invoking:
* </p>
* <ul>
* <li>Constructor</li>
* <li>A read/write call</li>
* <li>A call to {@link AutoCloseable#close()}</li>
* <li>A read/write call, then subsequently in the call to {@link AutoCloseable#close()} - via
* {@code try}-with-resources</li>
* </ul>
* </p>
*
* <p>
* That's a lot of branches to cover - often it is irrelevant to the application which branch actually throws, but
* regardless test coverage suffers without some needless stub/mocked throw-on-create/read/write/close tests.
Expand Down Expand Up @@ -117,8 +115,8 @@ public static <C extends AutoCloseable, R> R closeAfterApplying(@WillClose C clo
/**
* Applies the bi-function to the closeable, returning the result and closing the closable - checked exceptions are
* rethrown as unchecked.
* @param closeable the closeable subject of the {@code convert} function
* @param instance
* @param closeable the closeable subject of the {@code convert} bi-function
* @param instance the second argument for the bi-function
* @param convert the function consuming the closeable and supplying the result
*
* @param <C> the auto-closeable type, will be applied and closed
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/io/earcam/unexceptional/Exceptional.java
Expand Up @@ -331,8 +331,6 @@ public static <T> T call(Callable<T> callable)
* <p>
* The interrupt flag will be reset IFF {@code caught instanceof InterruptedException}
* </p>
* <p>
* </p>
*
* @param caught any {@link Throwable}
* @return a {@link RuntimeException}, typically a subclass of {@link UncheckedException} or an
Expand Down Expand Up @@ -1003,6 +1001,8 @@ public static <C extends AutoCloseable> void closeAfterAccepting(C closeable, Ch
/**
* Invokes the {@link Iterable#forEach(Consumer)} method having unchecked the consumer
*
* @param <T> the consumed {@link Iterable}'s element type
*
* @param iterable the Iterable to consume each element of
* @param consumer the checked consumer of the Iterable's elements
*
Expand All @@ -1017,7 +1017,10 @@ public static <T> void forEach(Iterable<T> iterable, CheckedConsumer<T> consumer


/**
* Invokes the {@link Map#forEach(Consumer)} method having unchecked the bi-consumer
* Invokes the {@link Map#forEach(BiConsumer)} method having unchecked the bi-consumer
*
* @param <K> the consumed {@link Map}'s key type
* @param <V> the consumed {@link Map}'s value type
*
* @param map the entries to consume
* @param consumer the consumer of the map's key value pairs
Expand Down

0 comments on commit 92a253c

Please sign in to comment.