public final class CustomWidthArray
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
CustomWidthArray(long numWords,
int keyWidth) |
CustomWidthArray(long numWords,
int keyWidth,
int fullWidth) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(long value) |
boolean |
addWithFixedCapacity(long value) |
void |
clear(long index) |
void |
ensureCapacity(long numWords) |
void |
fill(long l,
long n) |
long |
get(long index) |
long |
get(long index,
int offset,
int width) |
boolean |
getBit(long index) |
int |
getFullWidth() |
int |
getKeyWidth() |
void |
incrementCount(long index,
long count) |
long |
linearSearch(long key,
long rangeStart,
long rangeEnd,
long startIndex,
long emptyKey,
boolean returnFirstEmptyIndex) |
static int |
numBitsNeeded(long n) |
void |
set(long index,
long value) |
void |
set(long index,
long value,
int offset,
int width) |
void |
setAndGrowIfNeeded(long pos,
long value) |
void |
setAndGrowIfNeeded(long pos,
long value,
int offset,
int width) |
long |
size() |
void |
trim() |
void |
trimToSize(long sizeHere) |
public CustomWidthArray(long numWords, int keyWidth)
public CustomWidthArray(long numWords, int keyWidth, int fullWidth)
public int getKeyWidth()
public void ensureCapacity(long numWords)
public void trim()
public void trimToSize(long sizeHere)
sizeHere
- public boolean getBit(long index)
public void clear(long index)
public boolean add(long value)
public boolean addWithFixedCapacity(long value)
public long get(long index)
public long get(long index, int offset, int width)
public static int numBitsNeeded(long n)
public void set(long index, long value)
public void set(long index, long value, int offset, int width)
public void setAndGrowIfNeeded(long pos, long value)
public void setAndGrowIfNeeded(long pos, long value, int offset, int width)
public long size()
public void fill(long l, long n)
public long linearSearch(long key, long rangeStart, long rangeEnd, long startIndex, long emptyKey, boolean returnFirstEmptyIndex)
public void incrementCount(long index, long count)
public int getFullWidth()