com.metsci.glimpse.util
Class PrimitiveVector.Long
java.lang.Object
com.metsci.glimpse.util.PrimitiveVector
com.metsci.glimpse.util.PrimitiveVector.Long
- Enclosing class:
- PrimitiveVector
public static class PrimitiveVector.Long
- extends PrimitiveVector
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrimitiveVector.Long
public PrimitiveVector.Long()
PrimitiveVector.Long
public PrimitiveVector.Long(int initialCapacity)
add
public final void add(long x)
add
public final void add(long[] x)
add
public final void add(long[] x,
int start,
int len)
add
public final void add(PrimitiveVector.Long x)
getUnderlyingData
public final long[] getUnderlyingData()
getCopiedData
public final long[] getCopiedData()
get
public final long get(int i)
size
public final int size()
- Description copied from class:
PrimitiveVector
- Returns the number of elements stored in this array.
capacity
public final int capacity()
- Description copied from class:
PrimitiveVector
- Returns the size of the underlying array.
getAsDouble
public final double getAsDouble(int i)
removeAll
public void removeAll()
- Description copied from class:
PrimitiveVector
- Removes all elements from the vector.
trimToSize
public void trimToSize()
- Description copied from class:
PrimitiveVector
- Copies the data into a new underlying array of minimum sufficient size.
Typically there will be unused slots in the underlying array,
causing the PrimitiveVector
to use more memory than
necessary. Calling this function eliminates this overhead; however,
calling it too often will reduce performance.
NOTE: For large arrays, calling this method will temporarily
double its memory footprint for the the purpose of copying.
Copyright © 2012 Metron, Inc.. All Rights Reserved.