@Immutable public final class BitSetHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static BitSet |
createBitSet(byte nValue)
Convert the passed byte value to an bit set of size 8.
|
static BitSet |
createBitSet(int nValue)
Convert the passed int value to an bit set of size 32.
|
static BitSet |
createBitSet(long nValue)
Convert the passed long value to an bit set of size 64.
|
static BitSet |
createBitSet(short nValue)
Convert the passed short value to an bit set of size 16.
|
static int |
getExtractedIntValue(BitSet aBS)
Extract the int representation of the passed bit set.
|
static long |
getExtractedLongValue(BitSet aBS)
Extract the long representation of the passed bit set.
|
@Nonnull public static BitSet createBitSet(byte nValue)
nValue - The value to be converted to a bit set.null bit set.@Nonnull public static BitSet createBitSet(short nValue)
nValue - The value to be converted to a bit set.null bit set.@Nonnull public static BitSet createBitSet(int nValue)
nValue - The value to be converted to a bit set.null bit set.@Nonnull public static BitSet createBitSet(long nValue)
nValue - The value to be converted to a bit set.null bit set.public static int getExtractedIntValue(@Nonnull BitSet aBS)
aBS - The bit set to extract the value from. May not be null.public static long getExtractedLongValue(@Nonnull BitSet aBS)
aBS - The bit set to extract the value from. May not be null.Copyright © 2014–2019 Philip Helger. All rights reserved.