From f0e585d22c24eec3a723c6f0ea2a18252c570303 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Wed, 16 Nov 2016 11:22:33 -0500 Subject: Documentation update --- .../main/java/bjc/utils/funcutils/ListUtils.java | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcutils') 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 cafa80f..94571f5 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/funcutils/ListUtils.java +++ b/BJC-Utils2/src/main/java/bjc/utils/funcutils/ListUtils.java @@ -219,10 +219,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, @@ -266,6 +264,23 @@ public class ListUtils { return returnedList; } + /** + * Pad the provided list out to the desired size + * + * @param + * The type of elements in the list + * @param list + * The list to pad out + * @param counter + * The function to count elements with + * @param size + * The desired size of the list + * @param padSource + * The function to get elements to pad with + * @return The list, padded to the desired size + * @throws IllegalArgumentException + * if the list couldn't be padded to the desired size + */ public static IList padList(IList list, Function counter, int size, Supplier padSource) { -- cgit v1.2.3