public class ArrayListUtil
extends java.lang.Object
ArrayLists.| Constructor and Description |
|---|
ArrayListUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
fastUnorderedRemove(java.util.ArrayList<T> list,
int index)
Removes element at index, but instead of copying all elements to the left, moves into the same slot the last
element.
|
static <T> void |
fastUnorderedRemove(java.util.ArrayList<T> list,
int index,
int lastIndex)
Removes element at index, but instead of copying all elements to the left, moves into the same slot the last
element.
|
static <T> boolean |
fastUnorderedRemove(java.util.ArrayList<T> list,
T e)
Removes element but instead of copying all elements to the left, moves into the same slot the last element.
|
public static <T> void fastUnorderedRemove(java.util.ArrayList<T> list,
int index)
T - element type.list - to be modified.index - to be removed.java.lang.IndexOutOfBoundsException - if index is out of bounds.public static <T> void fastUnorderedRemove(java.util.ArrayList<T> list,
int index,
int lastIndex)
T - element type.list - to be modified.index - to be removed.lastIndex - last element index in the list to be swapped into the removed index.java.lang.IndexOutOfBoundsException - if index or lastIndex are out of bounds.public static <T> boolean fastUnorderedRemove(java.util.ArrayList<T> list,
T e)
T - element type.list - to be modified.e - to be removed.Copyright © 2014-2019 Real Logic Ltd. All Rights Reserved.