documentation states that remove* methods do not release any memory
This commit is contained in:
@@ -206,6 +206,9 @@ public final class IntList implements Serializable, Cloneable {
|
||||
|
||||
/**
|
||||
* Removes elements from the list.
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* 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;
|
||||
|
||||
Reference in New Issue
Block a user