Package picard.util
Class UnsignedTypeUtil
java.lang.Object
picard.util.UnsignedTypeUtil
A utility class for dealing with unsigned types. This class is primarily used for promoting a value in an unsigned type to
the same value in the net larger type of the same form (e.g. Integer to Long)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
uByteToInt
(byte unsignedByte) Convert an unsigned byte to a signed intstatic int
uByteToShort
(byte unsignedByte) Convert an unsigned byte to a signed shortstatic float
uIntToFloat
(int unsignedInt) static long
uIntToLong
(int unsignedInt) Convert an unsigned int to a longstatic int
uShortToInt
(short unsignedShort) Convert an unsigned short to an Int
-
Constructor Details
-
UnsignedTypeUtil
public UnsignedTypeUtil()
-
-
Method Details
-
uByteToInt
public static int uByteToInt(byte unsignedByte) Convert an unsigned byte to a signed int -
uByteToShort
public static int uByteToShort(byte unsignedByte) Convert an unsigned byte to a signed short -
uShortToInt
public static int uShortToInt(short unsignedShort) Convert an unsigned short to an Int -
uIntToLong
public static long uIntToLong(int unsignedInt) Convert an unsigned int to a long -
uIntToFloat
public static float uIntToFloat(int unsignedInt)
-