public class FastLongBuffer
extends java.lang.Object
implements com.ximpleware.extended.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.
|
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 void append(long[] long_array)
long_array
- long[]public void append(long i)
i
- longpublic int getCapacity()
public long[] getLongArray(int startingOffset, int len)
startingOffset
- intlen
- intpublic int getPageSize()
public long longAt(int index)
longAt
in interface com.ximpleware.extended.ILongBuffer
index
- intpublic int lower32At(int index)
lower32At
in interface com.ximpleware.extended.ILongBuffer
index
- intpublic void modifyEntry(int index, long newValue)
modifyEntry
in interface com.ximpleware.extended.ILongBuffer
index
- intnewValue
- longpublic int size()
size
in interface com.ximpleware.extended.ILongBuffer
public long[] toLongArray()
public int upper32At(int index)
upper32At
in interface com.ximpleware.extended.ILongBuffer
index
- intpublic void clear()