28import jau.util.SyncedBitfield;
47 if( 32 >= storageBitSize ) {
48 return new jau.util.Int32Bitfield();
50 return new jau.util.Int32ArrayBitfield(storageBitSize);
80 int get32(
final int lowBitnum,
final int length)
throws IndexOutOfBoundsException;
91 void put32(
final int lowBitnum,
final int length,
final int data)
throws IndexOutOfBoundsException;
106 int copy32(
final int srcLowBitnum,
final int dstLowBitnum,
final int length)
throws IndexOutOfBoundsException;
113 boolean get(
final int bitnum)
throws IndexOutOfBoundsException;
121 boolean put(
final int bitnum,
final boolean bit)
throws IndexOutOfBoundsException;
128 void set(
final int bitnum)
throws IndexOutOfBoundsException;
135 void clear(
final int bitnum)
throws IndexOutOfBoundsException;
144 boolean copy(
final int srcBitnum,
final int dstBitnum)
throws IndexOutOfBoundsException;
Simple synchronized Bitfield by wrapping an existing Bitfield.
Simple Bitfield factory for returning the efficient implementation.
static Bitfield synchronize(final Bitfield impl)
Creates a synchronized Bitfield by wrapping the given Bitfield instance.
static Bitfield create(final int storageBitSize)
Creates am efficient Bitfield instance based on the requested storageBitSize.
Simple bitfield interface for efficient bit storage access in O(1).
void clearField(final boolean bit)
Set all bits of this bitfield to the given value bit.
boolean copy(final int srcBitnum, final int dstBitnum)
Copies the bit at position srcBitnum to position dstBitnum and returning true if the bit is set,...
int copy32(final int srcLowBitnum, final int dstLowBitnum, final int length)
Copies length bits at position srcLowBitnum to position dstLowBitnum and returning the bits.
int size()
Returns the storage size in bit units, e.g.
void clear(final int bitnum)
Clear the bit at position bitnum according to bit.
boolean put(final int bitnum, final boolean bit)
Set or clear the bit at position bitnum according to bit and return the previous value.
int bitCount()
Returns the number of one bits within this bitfield.
int get32(final int lowBitnum, final int length)
Returns length bits from this storage, starting with the lowest bit from the storage position lowBitn...
void put32(final int lowBitnum, final int length, final int data)
Puts length bits of given data into this storage, starting w/ the lowest bit to the storage position ...