Table of Contents

Class BitUtil

Namespace
DxFeed.Graal.Net.Utils
Assembly
DxFeed.Graal.Net.dll

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 int

The specified value from which bits are extracted.

mask int

The bit mask.

shift int

The 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 int

The specified value in which bits are to be set.

mask int

The bit mask.

shift int

The number of positions to shift the value.

bits int

The bits to be set.

Returns

int

A value with the specified bits set.