|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cruxframework.crux.core.client.collection.FastList<V>
V - value typepublic class FastList<V>
Lightweight List implementation. This implementation has a superior performance compared to ArrayList. It uses native javascript implementation on production to increase performance.
| Constructor Summary | |
|---|---|
FastList()
Constructor |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FastList()
| Method Detail |
|---|
public final V get(int index)
index - element position
public final V extractFirst()
public final void add(V value)
value - element to add
public final void add(int beforeIndex,
V value)
beforeIndex - position to put the elementvalue - element to addpublic final boolean contains(V value)
value - value to search
public final V remove(int index)
index - element position
public boolean remove(V value)
value -
public final int size()
public final void clear()
public final int indexOf(V value)
value - element to search
public final void set(int index,
V value)
index - element positionvalue - element to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||