Package picard.util
Class UnsignedTypeUtil
- java.lang.Object
-
- picard.util.UnsignedTypeUtil
-
public class UnsignedTypeUtil extends Object
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 Constructor Description UnsignedTypeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intuByteToInt(byte unsignedByte)Convert an unsigned byte to a signed intstatic intuByteToShort(byte unsignedByte)Convert an unsigned byte to a signed shortstatic floatuIntToFloat(int unsignedInt)static longuIntToLong(int unsignedInt)Convert an unsigned int to a longstatic intuShortToInt(short unsignedShort)Convert an unsigned short to an Int
-
-
-
Method Detail
-
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)
-
-