T - public class SegmentList<TARRAY,T> extends ArrayList<TARRAY>
FloatArray dynamic array using an ArrayList as segmentation store. the
segments are object arrays. were created as a base for fast primitive segmentation arrays, but it is not faster than
the origin ArrayList. because of constraint java generics, it is not possible to use with primitives.
use: - call the constructor like: new SegmentList(byte.class) - add your items with ArrayList.add(Object)giving a new f.e. byte array - get the full array throughtoSegmentArray()
| Modifier and Type | Field and Description |
|---|---|
protected int |
capacity
capacity on growing segmentation list
#seg |
protected static int |
DEFAULT_CAPACITY
default capacity on growing segmentation list
#seg |
protected static int |
DEFAULT_SEGMENTATION
default size of segmentation arrays
|
modCount| Constructor and Description |
|---|
SegmentList()
constructor
|
SegmentList(Class<T> type) |
SegmentList(Class<T> type,
int capacity)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
elementCount() |
TARRAY |
toSegmentArray()
creates one new primitive array holding all stored elements
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodeparallelStream, streamprotected int capacity
#segprotected static final int DEFAULT_SEGMENTATION
protected static final int DEFAULT_CAPACITY
#segpublic int elementCount()
public TARRAY toSegmentArray()
Copyright © 2012–2018. All rights reserved.