This class represents a random access collection with real-time behavior (smooth capacity increase).
This class has the following advantages over the widely used java.util.ArrayList
:
- No large array allocation (for large collections multi-dimensional arrays are employed). The garbage collector is not stressed with large chunk of memory to allocate (likely to trigger a full garbage collection due to memory fragmentation).
- Support concurrent access/iteration/modification without synchronization if marked {@link FastCollection#shared shared}.
Iterations over the {@link FastTable} values are faster whenperformed using the {@link #get} method rather than using collectionrecords or iterators:[code] for (int i = 0, n = table.size(); i < n; i++) { table.get(i); }[/code]
{@link FastTable} supports {@link #sort sorting} in place (quick sort) using the {@link FastCollection#getValueComparator() value comparator}for the table (no object or array allocation when sorting).
@author
Jean-Marie Dautelle
@version 5.4.5, August 20, 2007