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.
|
* Removes elements from the list.
|
||||||
|
* <p>
|
||||||
|
* This method does not release any memory. Call {@link #trim()} to free unused
|
||||||
|
* memory.
|
||||||
*
|
*
|
||||||
* @param fromIndex
|
* @param fromIndex
|
||||||
* index of the first element to remove
|
* 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
|
* if {@code fromIndex} or {@code toIndex} is negative, or if the
|
||||||
* range defined by {@code fromIndex} and {@code toIndex} is out of
|
* range defined by {@code fromIndex} and {@code toIndex} is out of
|
||||||
* bounds
|
* bounds
|
||||||
|
* @see #trim()
|
||||||
*/
|
*/
|
||||||
public void remove(final int fromIndex, final int toIndex) {
|
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.
|
* 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
|
* @param remove
|
||||||
* the elements to remove
|
* the elements to remove
|
||||||
|
* @see #trim()
|
||||||
*/
|
*/
|
||||||
public void removeAll(final IntList remove) {
|
public void removeAll(final IntList remove) {
|
||||||
|
|
||||||
@@ -255,6 +263,17 @@ public final class IntList implements Serializable, Cloneable {
|
|||||||
index = insertPosition;
|
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) {
|
public void removeIf(final IntPredicate predicate) {
|
||||||
|
|
||||||
final int size = index;
|
final int size = index;
|
||||||
@@ -273,9 +292,13 @@ public final class IntList implements Serializable, Cloneable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retains all elements contained in the specified list.
|
* 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
|
* @param retain
|
||||||
* the elements to retain
|
* the elements to retain
|
||||||
|
* @see #trim()
|
||||||
*/
|
*/
|
||||||
public void retainAll(final IntList retain) {
|
public void retainAll(final IntList retain) {
|
||||||
final int size = index;
|
final int size = index;
|
||||||
|
|||||||
Reference in New Issue
Block a user