public class FastLongBuffer
extends java.lang.Object
implements com.ximpleware.ILongBuffer
| Constructor and Description |
|---|
FastLongBuffer()
FastLongBuffer constructor comment.
|
FastLongBuffer(int e)
Construct a FastLongBuffer instance with specified page size
|
FastLongBuffer(int e,
int c)
Construct a FastLongBuffer instance with specified page size
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(long i)
Append an integer to the end of this array buffer
|
void |
append(long[] long_array)
Append single long to the end of array buffer.
|
void |
clear()
set teh size of long buffer to zero, capacity
untouched so long buffer can be reused without
any unnecessary and additional allocation
|
int |
getCapacity()
Get the capacity of the buffer.
|
long[] |
getLongArray(int startingOffset,
int len)
Return a selected chuck of long buffer as a long array.
|
int |
getPageSize()
Get the buffer page size.
|
long |
longAt(int index)
Get the long val at given index value.
|
int |
lower32At(int index)
Get the lower 32 bit of the integer at the given index.
|
void |
modifyEntry(int index,
long newValue)
Modify the value at the index to a new val.
|
boolean |
resize(int newSz)
Set the size of FastLongBuffer to newSz if newSz is less than the
capacity, otherwise return false
|
int |
size()
Get the total number of longs in the buffer.
|
long[] |
toLongArray()
Convert all longs into a long array.
|
int |
upper32At(int index)
Return the upper 32 bit of the long at the index.
|
public FastLongBuffer()
public FastLongBuffer(int e)
e - int (so that pageSize = (1<public FastLongBuffer(int e,
int c)
e - int (so that pageSize = (1<c - int (suggest initial capacity of ArrayListpublic final void append(long i)
i - longpublic void append(long[] long_array)
long_array - long[]public final void clear()
public final int getCapacity()
public long[] getLongArray(int startingOffset,
int len)
startingOffset - intlen - intpublic final int getPageSize()
public final long longAt(int index)
longAt in interface com.ximpleware.ILongBufferindex - intpublic final int lower32At(int index)
lower32At in interface com.ximpleware.ILongBufferindex - intpublic final void modifyEntry(int index,
long newValue)
modifyEntry in interface com.ximpleware.ILongBufferindex - intnewValue - longpublic final boolean resize(int newSz)
newSz - public final int size()
size in interface com.ximpleware.ILongBufferpublic long[] toLongArray()
public final int upper32At(int index)
upper32At in interface com.ximpleware.ILongBufferindex - int