Class BitUtil
A collection of utility methods for bitwise operations.
Ports the Java class com.dxfeed.event.market.Util.
public static class BitUtil
- Inheritance
-
BitUtil
- Inherited Members
Methods
GetBits(int, int, int)
Extracts bits from the specified value.
public static int GetBits(int value, int mask, int shift)
Parameters
valueintThe specified value from which bits are extracted.
maskintThe bit mask.
shiftintThe number of positions to shift the value.
Returns
- int
The extracted bits.
SetBits(int, int, int, int)
Sets bits in the specified value.
public static int SetBits(int value, int mask, int shift, int bits)
Parameters
valueintThe specified value in which bits are to be set.
maskintThe bit mask.
shiftintThe number of positions to shift the value.
bitsintThe bits to be set.
Returns
- int
A value with the specified bits set.