public final class FastList<T> extends Object
Constructor and Description |
---|
FastList(Class<?> clazz)
Construct a FastList with a default size of 32.
|
FastList(Class<?> clazz,
int capacity)
Construct a FastList with a specfied size.
|
Modifier and Type | Method and Description |
---|---|
void |
add(T element)
Add an element to the tail of the FastList.
|
void |
clear()
Clear the FastList.
|
T |
get(int index)
Get the element at the specified index.
|
void |
remove(T element)
This remove method is most efficient when the element being removed
is the last element.
|
T |
removeLast()
Remove the last element from the list.
|
int |
size()
Get the current number of elements in the FastList.
|
public FastList(Class<?> clazz)
clazz
- the Class stored in the collectionpublic FastList(Class<?> clazz, int capacity)
clazz
- the Class stored in the collectioncapacity
- the initial size of the FastListpublic void add(T element)
element
- the element to addpublic T get(int index)
index
- the index of the element to getpublic T removeLast()
public void remove(T element)
element
- the element to removepublic void clear()
public int size()
Copyright © 2014 Zaxxer.com. All Rights Reserved.