public final class BitMagic extends Object
| Constructor and Description |
|---|
BitMagic() |
| Modifier and Type | Method and Description |
|---|---|
static byte |
byteFromNibbles(byte upperNibble,
byte lowerNibble) |
static byte |
byteFromNibbles(int upperNibble,
int lowerNibble) |
static int |
getBit(byte b,
int bitPosition) |
static int |
getBit(int dword,
int bitPosition) |
static int |
getBit(long qword,
int bitPosition) |
static int |
getBit(short word,
int bitPosition) |
static byte |
getLowerNibble(byte b) |
static byte |
getUpperNibble(byte b) |
static boolean |
isBitSet(byte b,
int bitPosition) |
static boolean |
isBitSet(int dword,
int bitPosition) |
static boolean |
isBitSet(long qword,
int bitPosition) |
static boolean |
isBitSet(short word,
int bitPosition) |
static byte |
reverse(byte b) |
static byte |
setBit(byte b,
int bitPosition,
int value) |
static int |
setBit(int dword,
int bitPosition,
int value) |
static long |
setBit(long qword,
int bitPosition,
int value) |
static short |
setBit(short word,
int bitPosition,
int value) |
static String |
toBitString(byte b) |
static String |
toBitString(int dword) |
static String |
toBitString(long qword) |
static String |
toBitString(short word) |
static byte |
toggleBit(byte b,
int bitPosition) |
static int |
toggleBit(int dword,
int bitPosition) |
static long |
toggleBit(long qword,
int bitPosition) |
static short |
toggleBit(short word,
int bitPosition) |
public static int getBit(byte b,
int bitPosition)
public static int getBit(short word,
int bitPosition)
public static int getBit(int dword,
int bitPosition)
public static int getBit(long qword,
int bitPosition)
public static byte setBit(byte b,
int bitPosition,
int value)
public static short setBit(short word,
int bitPosition,
int value)
public static int setBit(int dword,
int bitPosition,
int value)
public static long setBit(long qword,
int bitPosition,
int value)
public static boolean isBitSet(byte b,
int bitPosition)
public static boolean isBitSet(short word,
int bitPosition)
public static boolean isBitSet(int dword,
int bitPosition)
public static boolean isBitSet(long qword,
int bitPosition)
public static byte toggleBit(byte b,
int bitPosition)
public static short toggleBit(short word,
int bitPosition)
public static int toggleBit(int dword,
int bitPosition)
public static long toggleBit(long qword,
int bitPosition)
public static String toBitString(byte b)
public static String toBitString(short word)
public static String toBitString(int dword)
public static String toBitString(long qword)
public static byte getLowerNibble(byte b)
public static byte getUpperNibble(byte b)
public static byte byteFromNibbles(int upperNibble,
int lowerNibble)
public static byte byteFromNibbles(byte upperNibble,
byte lowerNibble)
public static byte reverse(byte b)
Copyright © 2015 silverspoon.io. All rights reserved.