BitUtils

fm.common.BitUtils$
object BitUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Concrete methods

def getLower(long: Long): Int

Get the lower 32 bits of the long

Get the lower 32 bits of the long

Attributes

def getLower(int: Int): Short

Get the lower 16 bits of the int

Get the lower 16 bits of the int

Attributes

def getLower24Bits(int: Int): Int

Get the lower 24 bits of the int

Get the lower 24 bits of the int

Attributes

def getLower8Bits(int: Int): Short

Get the lower 8 bits of the int

Get the lower 8 bits of the int

Attributes

def getUpper(long: Long): Int

Get the upper 32 bits of the long

Get the upper 32 bits of the long

Attributes

def getUpper(int: Int): Short

Get the upper 16 bits of the int

Get the upper 16 bits of the int

Attributes

def getUpper24Bits(int: Int): Int

Get the upper 24 bits of the int

Get the upper 24 bits of the int

Attributes

def getUpper8Bits(int: Int): Short

Get the upper 8 bits of the int

Get the upper 8 bits of the int

Attributes

def makeInt(a: Short, b: Short): Int
def makeIntWithLower24Bits(a: Short, b: Int): Int

Makes an int that combines an upper 8 bits (from a short) with the lower 24 bits (from an int)

Makes an int that combines an upper 8 bits (from a short) with the lower 24 bits (from an int)

Attributes

a

The upper 8 bits

b

The lower 24 bits

Returns:

The combined int

def makeIntWithUpper24Bits(a: Int, b: Short): Int

Makes an int that combines an upper 24 bits (from an int) with the lower 8 bits (from a short)

Makes an int that combines an upper 24 bits (from an int) with the lower 8 bits (from a short)

Attributes

a

The upper 24 bits

b

The lower 8 bits

Returns:

The combined int

def makeLong(a: Int, b: Int): Long

Create a long out of 2 ints such that the first int is the upper 32 bits of the long and the second int is the lower 32 bits of the long.

Create a long out of 2 ints such that the first int is the upper 32 bits of the long and the second int is the lower 32 bits of the long.

[a - upper 32 bits][b - lower 32 bits]

Attributes

def splitInt(int: Int): (Short, Short)

Split an int into 2 shorts (the reverse of makeInt())

Split an int into 2 shorts (the reverse of makeInt())

Attributes

def splitLong(long: Long): (Int, Int)

Split a long into 2 ints (the reverse of makeLong())

Split a long into 2 ints (the reverse of makeLong())

Attributes