Modifier and Type | Method and Description |
---|---|
static <T> void |
fastUnorderedRemove(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(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(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(ArrayList<T> list, int index)
T
- element type.list
- to be modified.index
- to be removed.IndexOutOfBoundsException
- if index is out of bounds.public static <T> void fastUnorderedRemove(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.IndexOutOfBoundsException
- if index or lastIndex are out of bounds.public static <T> boolean fastUnorderedRemove(ArrayList<T> list, T e)
T
- element type.list
- to be modified.e
- to be removed.Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.