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
value
intThe specified value from which bits are extracted.
mask
intThe bit mask.
shift
intThe 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
value
intThe specified value in which bits are to be set.
mask
intThe bit mask.
shift
intThe number of positions to shift the value.
bits
intThe bits to be set.
Returns
- int
A value with the specified bits set.