cern.colt.list
Class SimpleLongArrayList
java.lang.Object
  
cern.colt.PersistentObject
      
cern.colt.list.AbstractCollection
          
cern.colt.list.AbstractList
              
cern.colt.list.AbstractLongList
                  
cern.colt.list.SimpleLongArrayList
- All Implemented Interfaces: 
 - Cloneable, Serializable
 
- public class SimpleLongArrayList
- extends AbstractLongList
  
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.
- See Also:
 - Serialized Form
 
 
 
 
| 
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.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, shuffleFromTo, size, times, toList, toString | 
 
 
 
 
SimpleLongArrayList
public SimpleLongArrayList()
- Constructs an empty list.
 
SimpleLongArrayList
public SimpleLongArrayList(long[] elements)
- Constructs a list containing the specified elements. 
 The initial size and capacity of the list is the length of the array.
 WARNING: For efficiency reasons and to keep memory usage low, the array is not copied.
 So if subsequently you modify the specified array directly via the [] operator, be sure you know what you're doing.
 - Parameters:
 elements - the array to be backed by the the constructed list
SimpleLongArrayList
public SimpleLongArrayList(int initialCapacity)
- Constructs an empty list with the specified initial capacity.
 - Parameters:
 initialCapacity - the number of elements the receiver can hold without auto-expanding itself by allocating new internal memory.
ensureCapacity
public void ensureCapacity(int minCapacity)
- Ensures that the receiver can hold at least the specified number of elements without needing to allocate new internal memory.
 If necessary, allocates new internal memory and increases the capacity of the receiver.
- Specified by:
 ensureCapacity in class AbstractLongList
 
- Parameters:
 minCapacity - the desired minimum capacity.
 
 
trimToSize
public void trimToSize()
- Trims the capacity of the receiver to be the receiver's current 
 size. An application can use this operation to minimize the 
 storage of the receiver.
- Overrides:
 trimToSize in class AbstractList
 
 
 
Jump to the Colt Homepage