| Modifier and Type | Class and Description |
|---|---|
| public static class | Bitfield.
Simple |
| public static class | Bitfield.
Bit operation utilities (static). |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | UNSIGNED_INT_MAX_VALUE
Maximum 32 bit Unsigned Integer Value: |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public void | |
| public void | |
| public boolean | |
| public int | |
| public boolean | |
| public int | |
| public boolean | |
| public void | put32(final int
storage bit position of the lowest bit, restricted to [0.. lowBitnum, final int size()-length].number of bits to write, constrained to [0..32]. length, final int the actual bits to be put into this storage data)Puts |
| public void | |
| public int |
| UNSIGNED_INT_MAX_VALUE | back to summary |
|---|---|
| public static final int UNSIGNED_INT_MAX_VALUE Maximum 32 bit Unsigned Integer Value: | |
| bitCount | back to summary |
|---|---|
| public int bitCount() Returns the number of one bits within this bitfield.
Utilizes {#link | |
| clear | back to summary |
|---|---|
| public void clear(final int bitnum) throws IndexOutOfBoundsException Clear the bit at position
| |
| clearField | back to summary |
|---|---|
| public void clearField(final boolean bit) Set all bits of this bitfield to the given value | |
| copy | back to summary |
|---|---|
| public boolean copy(final int srcBitnum, final int dstBitnum) throws IndexOutOfBoundsException Copies the bit at position
| |
| copy32 | back to summary |
|---|---|
| public int copy32(final int srcLowBitnum, final int dstLowBitnum, final int length) throws IndexOutOfBoundsException Copies
Implementation shall operate as if invoking
| |
| get | back to summary |
|---|---|
| public boolean get(final int bitnum) throws IndexOutOfBoundsException Return
| |
| get32 | back to summary |
|---|---|
| public int get32(final int lowBitnum, final int length) throws IndexOutOfBoundsException Returns
| |
| put | back to summary |
|---|---|
| public boolean put(final int bitnum, final boolean bit) throws IndexOutOfBoundsException Set or clear the bit at position
| |
| put32 | back to summary |
|---|---|
| public void put32(final int lowBitnum, final int length, final int data) throws IndexOutOfBoundsException Puts
| |
| set | back to summary |
|---|---|
| public void set(final int bitnum) throws IndexOutOfBoundsException Set the bit at position
| |
| size | back to summary |
|---|---|
| public int size() Returns the storage size in bit units, e.g. 32 bit for implementations using one | |
Bitfield factory for returning the efficient implementation.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Bitfield | |
| public static Bitfield | synchronize(final Bitfield impl)
Creates a synchronized |
| Factory | back to summary |
|---|---|
| public Factory() | |
| create | back to summary |
|---|---|
| public static Bitfield create(final int storageBitSize) Creates am efficient
Implementation returns a plain 32 bit integer field implementation for
| |
| synchronize | back to summary |
|---|---|
| public static Bitfield synchronize(final Bitfield impl) Creates a synchronized | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static final int | bitCount(int n)
Returns the number of set bits within given 32bit integer in O(1) using a HAKEM 169 Bit Count inspired implementation: http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html http://home.pipeline.com/~hbaker1/hakmem/hacks.html#item169 http://tekpool.wordpress.com/category/bit-count/ http://www.hackersdelight.org/ |
| public static int |
| Util | back to summary |
|---|---|
| public Util() | |
| bitCount | back to summary |
|---|---|
| public static final int bitCount(int n) Returns the number of set bits within given 32bit integer in O(1) using a HAKEM 169 Bit Count inspired implementation: http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html http://home.pipeline.com/~hbaker1/hakmem/hacks.html#item169 http://tekpool.wordpress.com/category/bit-count/ http://www.hackersdelight.org/ | |
| getBitMask | back to summary |
|---|---|
| public static int getBitMask(final int n) Returns the 32 bit mask of n-bits, i.e. n low order 1’s. Implementation handles n == 32.
| |