V - value typepublic class FastList<V> extends Object
| Constructor and Description |
|---|
FastList()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int beforeIndex,
V value)
Insert the given element right before the specified position.
|
void |
add(V value)
Insert the given element at the end of the list.
|
void |
clear()
Remove all elements on this list
|
boolean |
contains(V value)
Check if the the list contains the specified value
|
V |
extractFirst()
Retrieve the first element and remove it from the list
|
V |
get(int index)
Retrieve an element from the list, based on the specified index
|
int |
indexOf(V value)
Retrieve the position of the given element on this list.
|
V |
remove(int index)
Remove the element at the given position.
|
boolean |
remove(V value)
Remove the given element from the list.
|
void |
set(int index,
V value)
Set the given element into the specified position on this list.
|
int |
size()
Return the list size
|
public final V get(int index)
index - element positionpublic final V extractFirst()
public final void add(V value)
value - element to addpublic final void add(int beforeIndex,
V value)
beforeIndex - position to put the elementvalue - element to addpublic final boolean contains(V value)
value - value to searchpublic final V remove(int index)
index - element positionpublic boolean remove(V value)
value - public final int size()
public final void clear()
public final int indexOf(V value)
value - element to searchpublic final void set(int index,
V value)
index - element positionvalue - element to setCopyright © 2015. All rights reserved.