diff options
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcdata/IList.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/funcdata/IList.java | 8 |
1 files changed, 8 insertions, 0 deletions
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 014c298..037b2b6 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,14 @@ public interface IList<ContainedType> { */ boolean add(ContainedType item); + /** + * Add all of the elements in the provided list to this list + * + * @param items + * The list of items to add + * @return True if every item was succesfully added to the list, false + * otherwise + */ default boolean addAll(IList<ContainedType> items) { return items.map(this::add).anyMatch((bl) -> bl == false); } |
