28import org.jau.util.Bitfield;
41 public final synchronized int size() {
46 public final synchronized void clearField(
final boolean bit) {
51 public final synchronized int get32(
final int lowBitnum,
final int length)
throws IndexOutOfBoundsException {
52 return impl.
get32(lowBitnum, length);
56 public final synchronized void put32(
final int lowBitnum,
final int length,
final int data)
throws IndexOutOfBoundsException {
57 impl.
put32(lowBitnum, length, data);
61 public final synchronized int copy32(
final int srcLowBitnum,
final int dstLowBitnum,
final int length)
throws IndexOutOfBoundsException {
62 return impl.
copy32(srcLowBitnum, dstLowBitnum, length);
66 public final synchronized boolean get(
final int bitnum)
throws IndexOutOfBoundsException {
67 return impl.
get(bitnum);
71 public final synchronized boolean put(
final int bitnum,
final boolean bit)
throws IndexOutOfBoundsException {
72 return impl.
put(bitnum, bit);
76 public final synchronized void set(
final int bitnum)
throws IndexOutOfBoundsException {
81 public final synchronized void clear(
final int bitnum)
throws IndexOutOfBoundsException {
86 public final synchronized boolean copy(
final int srcBitnum,
final int dstBitnum)
throws IndexOutOfBoundsException {
87 return impl.
copy(srcBitnum, dstBitnum);
Simple synchronized Bitfield by wrapping an existing Bitfield.
SyncedBitfield(final Bitfield impl)
final synchronized int copy32(final int srcLowBitnum, final int dstLowBitnum, final int length)
Copies length bits at position srcLowBitnum to position dstLowBitnum and returning the bits.
final synchronized void clear(final int bitnum)
Clear the bit at position bitnum according to bit.
final synchronized int bitCount()
Returns the number of one bits within this bitfield.
final synchronized 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,...
final synchronized void clearField(final boolean bit)
Set all bits of this bitfield to the given value bit.
final synchronized int size()
Returns the storage size in bit units, e.g.
final synchronized int get32(final int lowBitnum, final int length)
Returns length bits from this storage, starting with the lowest bit from the storage position lowBitn...
final synchronized boolean put(final int bitnum, final boolean bit)
Set or clear the bit at position bitnum according to bit and return the previous value.
final synchronized 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 ...
Simple bitfield interface for efficient bit storage access in O(1).
boolean get(final int bitnum)
Return true if the bit at position bitnum is set, otherwise false.
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.
void set(final int bitnum)
Set the bit at position bitnum according to bit.
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 ...