From ae51c587c53f7ca311e556e3cbd0c5566d6c2843 Mon Sep 17 00:00:00 2001 From: bjculkin Date: Mon, 12 Feb 2018 22:44:26 -0500 Subject: Update --- .../main/java/bjc/utils/funcutils/FuncUtils.java | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'base/src/main/java/bjc/utils/funcutils/FuncUtils.java') diff --git a/base/src/main/java/bjc/utils/funcutils/FuncUtils.java b/base/src/main/java/bjc/utils/funcutils/FuncUtils.java index 4be6d78..2e55a3d 100644 --- a/base/src/main/java/bjc/utils/funcutils/FuncUtils.java +++ b/base/src/main/java/bjc/utils/funcutils/FuncUtils.java @@ -16,19 +16,19 @@ public class FuncUtils { * function. * * @param - * The initial type of the function. + * The initial type of the function. * * @param - * The intermediate type of the function. + * The intermediate type of the function. * * @param - * The terminal type of the function. + * The terminal type of the function. * * @param func - * The function to transform. + * The function to transform. * - * @return - * The function transformed into a unary function returning a function. + * @return The function transformed into a unary function returning a + * function. */ public static Function> curry2(final BiFunction func) { return arg1 -> arg2 -> { @@ -40,13 +40,13 @@ public class FuncUtils { * Do the specified action the specified number of times. * * @param nTimes - * The number of times to do the action. + * The number of times to do the action. * * @param cons - * The action to perform. + * The action to perform. */ public static void doTimes(final int nTimes, final Consumer cons) { - for (int i = 0; i < nTimes; i++) { + for(int i = 0; i < nTimes; i++) { cons.accept(i); } } @@ -55,11 +55,13 @@ public class FuncUtils { * Return an operator that executes until it converges. * * @param op - * The operator to execute. + * The operator to execute. * * @param maxTries - * The maximum amount of times to apply the function in an attempt - * to cause it to converge. + * The maximum amount of times to apply the function in an + * attempt to cause it to converge. + * + * @return The requested operator. */ public static UnaryOperator converge(final UnaryOperator op, final int maxTries) { return (val) -> { -- cgit v1.2.3