From 42f7d379a430aaf2fad169f0170de04072b08b10 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Fri, 22 Apr 2016 14:48:04 -0400 Subject: Formatting changes --- .../main/java/bjc/utils/funcutils/EnumUtils.java | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcutils/EnumUtils.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/funcutils/EnumUtils.java b/BJC-Utils2/src/main/java/bjc/utils/funcutils/EnumUtils.java index 3374aa2..67fd5ec 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/funcutils/EnumUtils.java +++ b/BJC-Utils2/src/main/java/bjc/utils/funcutils/EnumUtils.java @@ -13,24 +13,6 @@ import bjc.utils.funcdata.IFunctionalList; * */ public class EnumUtils { - /** - * Get a random value from an enum - * - * @param - * The type of the enum - * @param enumClass - * The class of the enum - * @param rnd - * The random source to use - * @return A random value from the specified enum - */ - public static > E getRandomValue(Class enumClass, - Random rnd) { - E[] enumValues = enumClass.getEnumConstants(); - - return new FunctionalList<>(enumValues).randItem(rnd::nextInt); - } - /** * Do an action for a random number of enum values * @@ -61,4 +43,22 @@ public class EnumUtils { valueList.forEach(action); } + + /** + * Get a random value from an enum + * + * @param + * The type of the enum + * @param enumClass + * The class of the enum + * @param rnd + * The random source to use + * @return A random value from the specified enum + */ + public static > E getRandomValue(Class enumClass, + Random rnd) { + E[] enumValues = enumClass.getEnumConstants(); + + return new FunctionalList<>(enumValues).randItem(rnd::nextInt); + } } -- cgit v1.2.3