com.browseengine.bobo.util
Class BigNestedIntArray.BufferedLoader
java.lang.Object
com.browseengine.bobo.util.BigNestedIntArray.Loader
com.browseengine.bobo.util.BigNestedIntArray.BufferedLoader
- Enclosing class:
- BigNestedIntArray
public static final class BigNestedIntArray.BufferedLoader
- extends BigNestedIntArray.Loader
A loader that buffer all data in memory, then load them to BigNestedIntArray.
Data does not need to be sorted prior to the operation.
Note that this loader supports only non-negative integer data.
|
Method Summary |
boolean |
add(int id,
int val)
adds a pair of id and value to the buffer |
int |
capacity()
|
void |
load()
loads data |
void |
reset(int size,
int maxItems,
BigIntBuffer buffer)
resets loader. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BigNestedIntArray.BufferedLoader
public BigNestedIntArray.BufferedLoader(int size,
int maxItems,
BigIntBuffer buffer)
BigNestedIntArray.BufferedLoader
public BigNestedIntArray.BufferedLoader(int size)
reset
public void reset(int size,
int maxItems,
BigIntBuffer buffer)
- resets loader. This also resets underlying BigIntBuffer.
add
public final boolean add(int id,
int val)
- adds a pair of id and value to the buffer
- Parameters:
id - val -
load
public final void load()
- Description copied from class:
BigNestedIntArray.Loader
- loads data
- Specified by:
load in class BigNestedIntArray.Loader
capacity
public final int capacity()
Copyright © 2011. All Rights Reserved.