Save This Page
Home » mahout-collections-1.0-src » org.apache.mahout.math.list » [javadoc | source]
org.apache.mahout.math.list
public class: SimpleLongArrayList [javadoc | source]
java.lang.Object
   AbstractLongList
      org.apache.mahout.math.list.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.
Constructor:
 public SimpleLongArrayList() 
 public SimpleLongArrayList(long[] elements) 
Method from org.apache.mahout.math.list.SimpleLongArrayList Summary:
ensureCapacity,   getQuick,   setQuick,   trimToSize
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.mahout.math.list.SimpleLongArrayList Detail:
 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.
 protected long getQuick(int index) 
    Returns the element at the specified position in the receiver; WARNING: Does not check preconditions. Provided with invalid parameters this method may return invalid elements without throwing any exception! You should only use this method when you are absolutely sure that the index is within bounds. Precondition (unchecked): index >= 0 && index < size().
 protected  void setQuick(int index,
    long element) 
    Replaces the element at the specified position in the receiver with the specified element; WARNING: Does not check preconditions. Provided with invalid parameters this method may access invalid indexes without throwing any exception! You should only use this method when you are absolutely sure that the index is within bounds. Precondition (unchecked): index >= 0 && index < size().
 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.