From 5cf7bcf156970fe72f79e40b8a6e320ea160ac83 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Fri, 21 Oct 2016 14:14:48 -0400 Subject: Documentation --- BJC-Utils2/src/main/java/bjc/utils/funcdata/IList.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcdata/IList.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/funcdata/IList.java b/BJC-Utils2/src/main/java/bjc/utils/funcdata/IList.java index 47acf1a..014c298 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/funcdata/IList.java +++ b/BJC-Utils2/src/main/java/bjc/utils/funcdata/IList.java @@ -28,6 +28,10 @@ public interface IList { */ boolean add(ContainedType item); + default boolean addAll(IList items) { + return items.map(this::add).anyMatch((bl) -> bl == false); + } + /** * Check if all of the elements of this list match the specified * predicate. @@ -62,8 +66,8 @@ public interface IList { */ public default ReducedType collect( Collector collector) { - BiConsumer accumulator = collector.accumulator(); + BiConsumer accumulator = collector + .accumulator(); return reduceAux(collector.supplier().get(), (value, state) -> { accumulator.accept(state, value); @@ -92,8 +96,8 @@ public interface IList { * @return A new list containing the merged pairs of lists. */ IList combineWith( - IList rightList, BiFunction itemCombiner); + IList rightList, + BiFunction itemCombiner); /** * Check if the list contains the specified item @@ -261,8 +265,7 @@ public interface IList { * its final state. */ ReducedType reduceAux(StateType initialValue, - BiFunction stateAccumulator, + BiFunction stateAccumulator, Function resultTransformer); /** -- cgit v1.2.3