summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/funcutils/FuncUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcutils/FuncUtils.java')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/funcutils/FuncUtils.java28
1 files changed, 14 insertions, 14 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/funcutils/FuncUtils.java b/BJC-Utils2/src/main/java/bjc/utils/funcutils/FuncUtils.java
index 2119ed7..4209e6d 100644
--- a/BJC-Utils2/src/main/java/bjc/utils/funcutils/FuncUtils.java
+++ b/BJC-Utils2/src/main/java/bjc/utils/funcutils/FuncUtils.java
@@ -12,20 +12,6 @@ import java.util.function.IntConsumer;
*/
public class FuncUtils {
/**
- * Do the specified action the specified number of times
- *
- * @param nTimes
- * The number of times to do the action
- * @param cons
- * The action to perform
- */
- public static void doTimes(int nTimes, IntConsumer cons) {
- for (int i = 0; i < nTimes; i++) {
- cons.accept(i);
- }
- }
-
- /**
* Convert a binary function into a unary function that returns a
* function
*
@@ -46,4 +32,18 @@ public class FuncUtils {
return func.apply(arg1, arg2);
};
}
+
+ /**
+ * Do the specified action the specified number of times
+ *
+ * @param nTimes
+ * The number of times to do the action
+ * @param cons
+ * The action to perform
+ */
+ public static void doTimes(int nTimes, IntConsumer cons) {
+ for (int i = 0; i < nTimes; i++) {
+ cons.accept(i);
+ }
+ }
}