|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcern.colt.PersistentObject
cern.colt.list.AbstractCollection
cern.colt.list.AbstractList
cern.colt.list.tlong.AbstractLongList
cern.colt.list.tlong.SimpleLongArrayList
public class SimpleLongArrayList
Resizable list holding long elements; implemented with arrays;
not efficient; just to demonstrate which methods you must override to
implement a fully functional list. First see the package summary and javadoc tree view to get the broad picture.
| Constructor Summary | |
|---|---|
SimpleLongArrayList()
Constructs an empty list. |
|
SimpleLongArrayList(int initialCapacity)
Constructs an empty list with the specified initial capacity. |
|
SimpleLongArrayList(long[] elements)
Constructs a list containing the specified elements. |
|
| Method Summary | |
|---|---|
void |
ensureCapacity(int minCapacity)
Ensures that the receiver can hold at least the specified number of elements without needing to allocate new internal memory. |
void |
trimToSize()
Trims the capacity of the receiver to be the receiver's current size. |
| Methods inherited from class cern.colt.list.tlong.AbstractLongList |
|---|
add, addAllOfFromTo, beforeInsert, beforeInsertAllOfFromTo, binarySearch, binarySearchFromTo, clone, contains, delete, elements, elements, equals, fillFromToWith, forEach, get, indexOf, indexOfFromTo, lastIndexOf, lastIndexOfFromTo, mergeSortFromTo, mergeSortFromTo, partFromTo, quickSortFromTo, quickSortFromTo, removeAll, removeFromTo, replaceFromToWithFrom, replaceFromToWithFromTo, replaceFromWith, retainAll, reverse, set, setSizeRaw, shuffleFromTo, size, times, toList, toString |
| Methods inherited from class cern.colt.list.AbstractList |
|---|
addAllOf, beforeInsertAllOf, clear, mergeSort, quickSort, remove, setSize, shuffle, sort, sortFromTo |
| Methods inherited from class cern.colt.list.AbstractCollection |
|---|
isEmpty |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleLongArrayList()
public SimpleLongArrayList(long[] elements)
elements - the array to be backed by the the constructed listpublic SimpleLongArrayList(int initialCapacity)
initialCapacity - the number of elements the receiver can hold without
auto-expanding itself by allocating new internal memory.| Method Detail |
|---|
public void ensureCapacity(int minCapacity)
ensureCapacity in class AbstractLongListminCapacity - the desired minimum capacity.public void trimToSize()
trimToSize in class AbstractList
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||