Skip to content
Permalink
Browse files

Javadoc updates

Signed-off-by: Caspar MacRae <earcam@gmail.com>
  • Loading branch information...
earcam committed Jul 27, 2018
1 parent 308b9ac commit 52e901f0cfacbd08e3e3dc6e3714a712001bc087
@@ -39,7 +39,7 @@
*
* @param t first argument
* @param u second argument
* @throws Throwable a possible checked exception
* @throws E a possible checked exception
*/
public abstract void accept(T t, U u) throws E;

@@ -40,7 +40,7 @@
* @param t first argument.
* @param u second argument.
* @return result of applying {@code this} function.
* @throws Throwable a possible checked exception
* @throws E a possible checked exception
*/
public abstract R apply(T t, U u) throws E;

@@ -41,6 +41,7 @@
* See {@link java.util.function.BinaryOperator#minBy(Comparator)}
*
* @param <T> arguments and return type
* @param <E> the type of Throwable declared
*
* @param comparator the comparator used to determine the minimum.
* @return a {@link CheckedBinaryOperator}
@@ -58,6 +59,7 @@
* See {@link java.util.function.BinaryOperator#maxBy(Comparator)}
*
* @param <T> arguments and return type
* @param <E> the type of Throwable declared
*
* @param comparator the comparator used to determine the maximum.
* @return a {@link CheckedBinaryOperator}
@@ -52,7 +52,7 @@ public default int applyAsInt(T t, T u) throws E
* @return a negative integer, zero, or a positive integer as the
* first argument is less than, equal to, or greater than the
* second, respectively.
* @throws Throwable any throwable
* @throws E any throwable
*/
public abstract int compare(T o1, T o2) throws E;

@@ -166,6 +166,7 @@ public default int applyAsInt(T t, T u) throws E
*
* @param <T> the type of element to be compared
* @param <U> the type of the sort key
* @param <E> the type of Throwable declared
*
* @param keyExtractor function used to extract sort key.
* @param keyComparator comparator used to compare extracted key.
@@ -188,6 +189,8 @@ public default int applyAsInt(T t, T u) throws E
*
* @param <T> the type of element to be compared.
* @param <U> the type of the sort key.
* @param <E> the type of Throwable declared
*
* @param keyExtractor the function used to extract the sort key.
* @return a comparator that compares by an extracted key.
* @throws NullPointerException if the argument is {@code null}.
@@ -205,6 +208,7 @@ public default int applyAsInt(T t, T u) throws E
* See {@link java.util.Comparator#comparingInt(java.util.function.ToIntFunction)}
*
* @param <T> the type of element to be compared.
* @param <E> the type of Throwable declared
*
* @param keyExtractor the function used to extract primitive {@code int} sort key.
* @return a checked comparator that compares by an extracted key.
@@ -225,6 +229,7 @@ public default int applyAsInt(T t, T u) throws E
* See {@link java.util.Comparator#comparingLong(java.util.function.ToLongFunction)}
*
* @param <T> the type of element to be compared.
* @param <E> the type of Throwable declared
*
* @param keyExtractor the function used to extract primitive {@code long} sort key.
* @return a checked comparator that compares by an extracted key.
@@ -245,6 +250,7 @@ public default int applyAsInt(T t, T u) throws E
* See {@link java.util.Comparator#comparingDouble(java.util.function.ToDoubleFunction)}
*
* @param <T> the type of element to be compared.
* @param <E> the type of Throwable declared
*
* @param keyExtractor the function used to extract primitive {@code double} sort key.
* @return a checked comparator that compares by an extracted key.
@@ -35,7 +35,7 @@
* See {@link java.util.function.Consumer#accept(Object)}
*
* @param t the input argument
* @throws Exception a possible checked exception
* @throws E a possible checked exception
*/
public abstract void accept(T t) throws E;

@@ -37,7 +37,7 @@
*
* @param t the function argument
* @return the function result
* @throws Throwable any throwable
* @throws E any throwable
*
* @since 0.2.0
*/
@@ -88,6 +88,8 @@
* See {@link java.util.function.Function#identity()}
*
* @param <T> argument and return type
* @param <E> the type of Throwable declared
*
* @return the argument as given
*
* @since 0.3.0
@@ -36,7 +36,7 @@
*
* @param value primitive {@code int} argument
* @return result
* @throws Throwable any throwable
* @throws E any throwable
*/
public abstract R apply(int value) throws E;
}
@@ -39,7 +39,8 @@
*
* @param t argument
* @return {@code true} if predicate matches, else {@code false}
* @throws Throwable any throwable
* @throws E any throwable
*
* @see java.util.function.Predicate#test(Object)
*/
public abstract boolean test(T t) throws E;
@@ -39,7 +39,7 @@
/**
* See {@link Runnable#run()}
*
* @throws Exception a checked exception
* @throws E a checked exception
*/
public abstract void run() throws E;

@@ -35,7 +35,7 @@
* See {@link java.util.function.Supplier#get()}
*
* @return result
* @throws Throwable any throwable
* @throws E any throwable
*/
public abstract T get() throws E;
}
@@ -36,7 +36,7 @@
*
* @param value argument
* @return double result of applying argument
* @throws Throwable any throwable
* @throws E any throwable
*/
public abstract double applyAsDouble(T value) throws E;
}
@@ -36,7 +36,7 @@
* @param t the first function argument
* @param u the second function argument
* @return the function result
* @throws Throwable Any throwable
* @throws E Any throwable
*/
int applyAsInt(T t, U u) throws E;

@@ -36,7 +36,7 @@
*
* @param value argument
* @return int result of applying argument
* @throws Throwable any throwable
* @throws E any throwable
*/
public abstract int applyAsInt(T value) throws E;
}
@@ -36,7 +36,7 @@
*
* @param value argument
* @return long result of applying argument
* @throws Throwable any throwable
* @throws E any throwable
*/
public abstract long applyAsLong(T value) throws E;
}
@@ -124,6 +124,7 @@ private Closing()
* @param <C> the auto-closeable type, will be applied and closed
* @param <U> the type of second argument to bi-function apply
* @param <R> the result type
* @param <E> the type of Throwable declared
*
* @return the result of applying {@code convert} function to the {@code closeable} argument
*/
@@ -234,14 +235,14 @@ public void close() throws E
*
* Example usage:
* <code>
* try(AutoClosed<VirtualMachine, IOException> vm = Closing.autoClosing(getCurrentVm(), VirtualMachine::detach)) {
* try(AutoClosed&lt;VirtualMachine, IOException&gt; vm = Closing.autoClosing(getCurrentVm(), VirtualMachine::detach)) {
* vm.get().loadAgent(x, y);
* }
* </code>
*
* @param instance
* @param closeMethod
* @return
* @param instance the owner of {@code closeMethod}
* @param closeMethod the method to invoke on {@code instance} when {@link AutoCloseable#close()} is called
* @return an {@link AutoClosed} wrapping {@code instance}
*
* @since 0.5.0
*/

0 comments on commit 52e901f

Please sign in to comment.
You can’t perform that action at this time.