diff --git a/primitiveCollections/src/main/java/org/lucares/collections/IntList.java b/primitiveCollections/src/main/java/org/lucares/collections/IntList.java index d7baed0..9e83aa7 100644 --- a/primitiveCollections/src/main/java/org/lucares/collections/IntList.java +++ b/primitiveCollections/src/main/java/org/lucares/collections/IntList.java @@ -206,6 +206,9 @@ public final class IntList implements Serializable, Cloneable { /** * Removes elements from the list. + *

+ * This method does not release any memory. Call {@link #trim()} to free unused + * memory. * * @param fromIndex * index of the first element to remove @@ -215,6 +218,7 @@ public final class IntList implements Serializable, Cloneable { * if {@code fromIndex} or {@code toIndex} is negative, or if the * range defined by {@code fromIndex} and {@code toIndex} is out of * bounds + * @see #trim() */ public void remove(final int fromIndex, final int toIndex) { @@ -236,9 +240,13 @@ public final class IntList implements Serializable, Cloneable { /** * Remove all elements that contained in the specified list. + *

+ * This method does not release any memory. Call {@link #trim()} to free unused + * memory. * * @param remove * the elements to remove + * @see #trim() */ public void removeAll(final IntList remove) { @@ -255,6 +263,17 @@ public final class IntList implements Serializable, Cloneable { index = insertPosition; } + /** + * Remove all elements that match the given predicate. + *

+ * This method does not release any memory. Call {@link #trim()} to free unused + * memory. + * + * + * @param predicate + * the predicate + * @see #trim() + */ public void removeIf(final IntPredicate predicate) { final int size = index; @@ -273,9 +292,13 @@ public final class IntList implements Serializable, Cloneable { /** * Retains all elements contained in the specified list. + *

+ * This method does not release any memory. Call {@link #trim()} to free unused + * memory. * * @param retain * the elements to retain + * @see #trim() */ public void retainAll(final IntList retain) { final int size = index;