|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ximpleware.FastLongBuffer
public class FastLongBuffer
A fast, unsynchronized, chunk-based long buffer for storing LCs and VTD. Creation date: (7/17/03 6:07:46 PM)
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 ArrayListMethod Detail |
---|
public final void append(long i)
i
- longpublic void append(long[] long_array)
long_array
- long[]public final void clear()
public int getCapacity()
public long[] getLongArray(int startingOffset, int len)
startingOffset
- intlen
- int
public int getPageSize()
public final long longAt(int index)
longAt
in interface com.ximpleware.ILongBuffer
index
- int
public final int lower32At(int index)
lower32At
in interface com.ximpleware.ILongBuffer
index
- int
public final void modifyEntry(int index, long newValue)
modifyEntry
in interface com.ximpleware.ILongBuffer
index
- intnewValue
- longpublic final int size()
size
in interface com.ximpleware.ILongBuffer
public long[] toLongArray()
public int upper32At(int index)
upper32At
in interface com.ximpleware.ILongBuffer
index
- int
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |