|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmce.util.FastArray<E>
public class FastArray<E>
A class like standard java.util.ArrayList but without implementation of list and synchronization for maximum performance.
Constructor Summary | |
---|---|
FastArray()
Default constructor. |
|
FastArray(int n)
Constructor with the initial capacity specified and a default growing size of 10. |
|
FastArray(int initialCapacity,
int growSize)
Constructor with initial capacity of the array and growing size. |
Method Summary | |
---|---|
void |
add(E o)
Add a new element to the end of the array |
void |
add(int i,
java.lang.Object o)
Insert a new element at the specified position. |
void |
clear()
Clear the array element |
boolean |
contains(java.lang.Object o)
Return true if the array contains the specified object. |
E |
get(int i)
Return the element at the specified position |
int |
getGrowSize()
Return the grow size. |
int |
getSize()
Return the size of the array. |
int |
indexOf(java.lang.Object o)
Return the index of the specified element or -1 if the element is not present in the array. |
void |
remove(int i)
Remove one element from the arrag. |
void |
remove(java.lang.Object o)
Remove the specified object from the array. |
void |
setGrowSize(int n)
Set the grow size. |
int |
size()
Deprecated. Use getSize() method. |
E[] |
toArray(E[] a)
Return an array with all elements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FastArray(int initialCapacity, int growSize)
initialCapacity
- - Initial capacity of the array.growSize
- - When the array is full it will be grow of
growSize element. If the growing size is 0 the array will
double it's capacity.public FastArray(int n)
public FastArray()
Method Detail |
---|
public final void setGrowSize(int n)
public final int getGrowSize()
@Deprecated public final int size()
public final int getSize()
public final void clear()
public final void add(E o)
public final void add(int i, java.lang.Object o)
public final int indexOf(java.lang.Object o)
public final void remove(int i)
public final void remove(java.lang.Object o)
public final E get(int i)
public final boolean contains(java.lang.Object o)
public final E[] toArray(E[] a)
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |