Deprecated
Use Bitfield implementations via Bitfield..
Simple bitfield holder class using an int[] storage.
IntBitfield allows convenient access of a wide field of transient bits using efficient storage in O(1).
It can be used e.g. to map key-codes to pressed-state etc.
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final long | |
| private final int[] | |
| private static final int | |
| private static final long | |
| public static final int | UNIT_SIZE
Unit size in bits, here 32 bits for one int unit. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final long | |
| private final void | |
| private final void | |
| public final boolean | |
| public final boolean | |
| public static final int | |
| public long | |
| public final boolean | put(final long bitnum, final boolean bit)
Set or clear the bit at position |
| public final boolean | put(final int bitnum, final boolean bit)
Set or clear the bit at position |
| bitsCountI | back to summary |
|---|---|
| private final int bitsCountI | |
| bitsCountL | back to summary |
|---|---|
| private final long bitsCountL | |
| storage | back to summary |
|---|---|
| private final int[] storage | |
| UNIT_SHIFT_I | back to summary |
|---|---|
| private static final int UNIT_SHIFT_I | |
| UNIT_SHIFT_L | back to summary |
|---|---|
| private static final long UNIT_SHIFT_L | |
| UNIT_SIZE | back to summary |
|---|---|
| public static final int UNIT_SIZE Unit size in bits, here 32 bits for one int unit. | |
| IntBitfield | back to summary |
|---|---|
| public IntBitfield(final long bitCount) | |
| IntBitfield | back to summary |
|---|---|
| public IntBitfield(final int bitCount) | |
| capacity | back to summary |
|---|---|
| public final long capacity() Return the capacity of this bit field, i.e. the number of bits stored int this field. | |
| check | back to summary |
|---|---|
| private final void check(final long bitnum) | |
| check | back to summary |
|---|---|
| private final void check(final int bitnum) | |
| get | back to summary |
|---|---|
| public final boolean get(final long bitnum) Return | |
| get | back to summary |
|---|---|
| public final boolean get(final int bitnum) Return | |
| getBitCount | back to summary |
|---|---|
| public static final int getBitCount(final int n)
Deprecated | |
| getBitCount | back to summary |
|---|---|
| public long getBitCount() Returns the number of set bits within this bitfield.
Utilizes {#link | |
| put | back to summary |
|---|---|
| public final boolean put(final long bitnum, final boolean bit) Set or clear the bit at position | |
| put | back to summary |
|---|---|
| public final boolean put(final int bitnum, final boolean bit) Set or clear the bit at position | |