From b65b705c391bb772bc41269bce5243c1cc88969d Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Fri, 22 Apr 2016 14:29:05 -0400 Subject: Formatting changes --- .../main/java/bjc/utils/funcutils/ListUtils.java | 33 ++++++++++------------ 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcutils/ListUtils.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/funcutils/ListUtils.java b/BJC-Utils2/src/main/java/bjc/utils/funcutils/ListUtils.java index 828f4c3..b0c30b3 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/funcutils/ListUtils.java +++ b/BJC-Utils2/src/main/java/bjc/utils/funcutils/ListUtils.java @@ -53,14 +53,13 @@ public class ListUtils { /* * List that holds our results */ - IFunctionalList> returnedList = - new FunctionalList<>(); + IFunctionalList> returnedList = new FunctionalList<>(); /* * List that holds current partition */ - IHolder> currentPartition = - new Identity<>(new FunctionalList<>()); + IHolder> currentPartition = new Identity<>( + new FunctionalList<>()); /* * List that holds elements rejected during current pass */ @@ -74,10 +73,8 @@ public class ListUtils { /* * Run up to a certain number of passes */ - for (int numberOfIterations = - 0; numberOfIterations < MAX_NTRIESPART - && !rejectedElements - .isEmpty(); numberOfIterations++) { + for (int numberOfIterations = 0; numberOfIterations < MAX_NTRIESPART + && !rejectedElements.isEmpty(); numberOfIterations++) { input.forEach(new GroupPartIteration<>(returnedList, currentPartition, rejectedElements, numberInCurrentPartition, numberPerPartition, @@ -125,8 +122,8 @@ public class ListUtils { "Set of operators must not be null"); } - IHolder> returnedList = - new Identity<>(input); + IHolder> returnedList = new Identity<>( + input); operators.forEach((operator) -> { returnedList.transform((oldReturn) -> { @@ -159,8 +156,8 @@ public class ListUtils { "Set of operators must not be null"); } - IHolder> returnedList = - new Identity<>(input); + IHolder> returnedList = new Identity<>( + input); operators.forEach((operator) -> returnedList .transform((oldReturn) -> oldReturn.flatMap((token) -> { @@ -236,8 +233,8 @@ public class ListUtils { public static IFunctionalList drawWithReplacement( IFunctionalList list, int numberOfItems, Function rng) { - IFunctionalList selectedItems = - new FunctionalList<>(new ArrayList<>(numberOfItems)); + IFunctionalList selectedItems = new FunctionalList<>( + new ArrayList<>(numberOfItems)); for (int i = 0; i < numberOfItems; i++) { selectedItems.add(list.randItem(rng)); @@ -265,8 +262,8 @@ public class ListUtils { public static IFunctionalList drawWithoutReplacement( IFunctionalList list, int numberOfItems, Function rng) { - IFunctionalList selectedItems = - new FunctionalList<>(new ArrayList<>(numberOfItems)); + IFunctionalList selectedItems = new FunctionalList<>( + new ArrayList<>(numberOfItems)); int totalItems = list.getSize(); @@ -295,8 +292,8 @@ public class ListUtils { * @return A list containing all the elements of the lists */ @SafeVarargs - public static IFunctionalList - mergeLists(IFunctionalList... lists) { + public static IFunctionalList mergeLists( + IFunctionalList... lists) { IFunctionalList returnedList = new FunctionalList<>(); for (IFunctionalList list : lists) { -- cgit v1.2.3