|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cosylab.util.BitSetUtilities
public final class BitSetUtilities
BitSetUtilities containes usefull clases to manipulate with
BitSet.
| Method Summary | |
|---|---|
static java.util.BitSet |
forLong(long value)
Converts long value to BitSet. |
static long |
getMaskedValue(long bits,
long mask)
Returns bit pattern by ignoring all zeros in the mask. |
static long |
toLong(java.util.BitSet value)
Converts BitSet to long value if possible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.util.BitSet forLong(long value)
long value to BitSet.
value - the long value
BitSet corresponding to the valuepublic static long toLong(java.util.BitSet value)
BitSet to long value if possible.
value - the BitSet object
java.lang.NullPointerException - DOCUMENT ME!
public static long getMaskedValue(long bits,
long mask)
Example:
mask = XX10101 bits = XX10010 getCompactValue() = XXXXX100
bits - bit pattern as long valuemask - mask which tells, which bits in pattern are visible, if less
than 0, maks is ignored
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||