Class SignednessUtil


  • @AnnotatedFor("nullness")
    public final class SignednessUtil
    extends java.lang.Object
    Provides static utility methods for unsigned values, beyond what is available in the JDK's Unsigned Integer API. The JDK's Unsigned Integer API is methods in primitive wrapper classes and in classes Arrays, RandomAccessFile, ObjectInputStream, and DataInputStream.

    SignednessUtilExtra has more methods that reference packages that Android does not provide. That is, SignednessUtil can be used anywhere, and SignednessUtilExtra can be used anywhere except on Android.

    See the Checker Framework Manual:
    Utility routines for manipulating unsigned values
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @org.checkerframework.checker.signedness.qual.Unsigned byte byteFromDouble​(double d)
      Returns an unsigned byte representing the same value as the double.
      static @org.checkerframework.checker.signedness.qual.Unsigned byte byteFromFloat​(float f)
      Returns an unsigned byte representing the same value as the float.
      static int compareUnsigned​(@org.checkerframework.checker.signedness.qual.Unsigned byte x, @org.checkerframework.checker.signedness.qual.Unsigned byte y)
      Compares two unsigned bytes x and y.
      static int compareUnsigned​(@org.checkerframework.checker.signedness.qual.Unsigned short x, @org.checkerframework.checker.signedness.qual.Unsigned short y)
      Compares two unsigned shorts x and y.
      static @org.checkerframework.checker.signedness.qual.Unsigned byte getUnsigned​(java.nio.ByteBuffer b)
      Gets an unsigned byte from the ByteBuffer b.
      static void getUnsigned​(java.nio.ByteBuffer b, @org.checkerframework.checker.signedness.qual.Unsigned byte[] bs)
      Gets an array of unsigned bytes from the ByteBuffer b and stores them in the array bs.
      static java.nio.ByteBuffer getUnsigned​(java.nio.ByteBuffer b, byte[] bs, int i, int l)
      Populates an unsigned byte array from the ByteBuffer b at i with l bytes.
      static @org.checkerframework.checker.signedness.qual.Unsigned byte getUnsigned​(java.nio.ByteBuffer b, int i)
      Gets an unsigned byte from the ByteBuffer b at i.
      static @org.checkerframework.checker.signedness.qual.Unsigned int getUnsigned​(java.nio.IntBuffer b, int i)
      Gets an unsigned int from the IntBuffer b at i.
      static @org.checkerframework.checker.signedness.qual.Unsigned int getUnsignedInt​(java.nio.ByteBuffer b)
      Gets an unsigned int from the ByteBuffer b.
      static @org.checkerframework.checker.signedness.qual.Unsigned short getUnsignedShort​(java.nio.ByteBuffer b)
      Gets an unsigned short from the ByteBuffer b.
      static @org.checkerframework.checker.signedness.qual.Unsigned int intFromDouble​(double d)
      Returns an unsigned int representing the same value as the double.
      static @org.checkerframework.checker.signedness.qual.Unsigned int intFromFloat​(float f)
      Returns an unsigned int representing the same value as the float.
      static @org.checkerframework.checker.signedness.qual.Unsigned long longFromDouble​(double d)
      Returns an unsigned long representing the same value as the double.
      static @org.checkerframework.checker.signedness.qual.Unsigned long longFromFloat​(float f)
      Returns an unsigned long representing the same value as the float.
      static java.nio.ByteBuffer putUnsigned​(java.nio.ByteBuffer b, @org.checkerframework.checker.signedness.qual.Unsigned byte ubyte)
      Places an unsigned byte into the ByteBuffer b.
      static java.nio.ByteBuffer putUnsigned​(java.nio.ByteBuffer b, int i, @org.checkerframework.checker.signedness.qual.Unsigned byte ubyte)
      Places an unsigned byte into the ByteBuffer b at i.
      static java.nio.IntBuffer putUnsigned​(java.nio.IntBuffer b, @org.checkerframework.checker.signedness.qual.Unsigned int uint)
      Places an unsigned int into the IntBuffer b.
      static java.nio.IntBuffer putUnsigned​(java.nio.IntBuffer b, @org.checkerframework.checker.signedness.qual.Unsigned int[] uints)
      Places an unsigned int array into the IntBuffer b.
      static java.nio.IntBuffer putUnsigned​(java.nio.IntBuffer b, @org.checkerframework.checker.signedness.qual.Unsigned int[] uints, int i, int l)
      Places an unsigned int array into the IntBuffer b at i with length l.
      static java.nio.IntBuffer putUnsigned​(java.nio.IntBuffer b, int i, @org.checkerframework.checker.signedness.qual.Unsigned int uint)
      Places an unsigned int into the IntBuffer b at i.
      static java.nio.ByteBuffer putUnsignedInt​(java.nio.ByteBuffer b, @org.checkerframework.checker.signedness.qual.Unsigned int uint)
      Places an unsigned int into the ByteBuffer b.
      static java.nio.ByteBuffer putUnsignedInt​(java.nio.ByteBuffer b, int i, @org.checkerframework.checker.signedness.qual.Unsigned int uint)
      Places an unsigned int into the ByteBuffer b at i.
      static java.nio.ByteBuffer putUnsignedLong​(java.nio.ByteBuffer b, int i, @org.checkerframework.checker.signedness.qual.Unsigned long ulong)
      Places an unsigned long into the ByteBuffer b at i.
      static java.nio.ByteBuffer putUnsignedShort​(java.nio.ByteBuffer b, @org.checkerframework.checker.signedness.qual.Unsigned short ushort)
      Places an unsigned short into the ByteBuffer b.
      static java.nio.ByteBuffer putUnsignedShort​(java.nio.ByteBuffer b, int i, @org.checkerframework.checker.signedness.qual.Unsigned short ushort)
      Places an unsigned short into the ByteBuffer b at i.
      static void readFullyUnsigned​(java.io.RandomAccessFile f, @org.checkerframework.checker.signedness.qual.Unsigned byte[] b)
      Reads a file fully into an unsigned byte array.
      static int readUnsigned​(java.io.RandomAccessFile f, @org.checkerframework.checker.signedness.qual.Unsigned byte[] b, int off, int len)
      Reads up to len bytes of data from this file into an unsigned array of bytes.
      static @org.checkerframework.checker.signedness.qual.Unsigned char readUnsignedChar​(java.io.RandomAccessFile f)
      Reads an unsigned char from the RandomAccessFile f.
      static @org.checkerframework.checker.signedness.qual.Unsigned int readUnsignedInt​(java.io.RandomAccessFile f)
      Reads an unsigned int from the RandomAccessFile f.
      static @org.checkerframework.checker.signedness.qual.Unsigned long readUnsignedLong​(java.io.RandomAccessFile f)
      Reads an unsigned long from the RandomAccessFile f.
      static @org.checkerframework.checker.signedness.qual.Unsigned short shortFromDouble​(double d)
      Returns an unsigned short representing the same value as the double.
      static @org.checkerframework.checker.signedness.qual.Unsigned short shortFromFloat​(float f)
      Returns an unsigned short representing the same value as the float.
      static double toDouble​(@org.checkerframework.checker.signedness.qual.Unsigned byte b)
      Returns a double representing the same value as the unsigned byte.
      static double toDouble​(@org.checkerframework.checker.signedness.qual.Unsigned int i)
      Returns a double representing the same value as the unsigned int.
      static double toDouble​(@org.checkerframework.checker.signedness.qual.Unsigned long l)
      Returns a double representing the same value as the unsigned long.
      static double toDouble​(@org.checkerframework.checker.signedness.qual.Unsigned short s)
      Returns a double representing the same value as the unsigned short.
      static float toFloat​(@org.checkerframework.checker.signedness.qual.Unsigned byte b)
      Returns a float representing the same value as the unsigned byte.
      static float toFloat​(@org.checkerframework.checker.signedness.qual.Unsigned int i)
      Returns a float representing the same value as the unsigned int.
      static float toFloat​(@org.checkerframework.checker.signedness.qual.Unsigned long l)
      Returns a float representing the same value as the unsigned long.
      static float toFloat​(@org.checkerframework.checker.signedness.qual.Unsigned short s)
      Returns a float representing the same value as the unsigned short.
      static @org.checkerframework.checker.signedness.qual.Unsigned int toUnsignedInt​(@org.checkerframework.checker.signedness.qual.Unsigned char c)
      Returns an unsigned int representing the same value as an unsigned char.
      static @org.checkerframework.checker.signedness.qual.Unsigned long toUnsignedLong​(@org.checkerframework.checker.signedness.qual.Unsigned char c)
      Returns an unsigned long representing the same value as an unsigned char.
      static @org.checkerframework.checker.signedness.qual.Unsigned short toUnsignedShort​(@org.checkerframework.checker.signedness.qual.Unsigned byte b)
      Returns an unsigned short representing the same value as an unsigned byte.
      static @org.checkerframework.checker.signedness.qual.Unsigned short toUnsignedShort​(@org.checkerframework.checker.signedness.qual.Unsigned char c)
      Returns an unsigned short representing the same value as an unsigned char.
      static java.lang.String toUnsignedString​(@org.checkerframework.checker.signedness.qual.Unsigned byte b)
      Produces a string representation of the unsigned byte b.
      static java.lang.String toUnsignedString​(@org.checkerframework.checker.signedness.qual.Unsigned byte b, int radix)
      Produces a string representation of the unsigned byte b in base radix.
      static java.lang.String toUnsignedString​(@org.checkerframework.checker.signedness.qual.Unsigned short s)
      Produces a string representation of the unsigned short s.
      static java.lang.String toUnsignedString​(@org.checkerframework.checker.signedness.qual.Unsigned short s, int radix)
      Produces a string representation of the unsigned short s in base radix.
      static java.nio.ByteBuffer wrapUnsigned​(@org.checkerframework.checker.signedness.qual.Unsigned byte[] array)
      Wraps an unsigned byte array into a ByteBuffer.
      static java.nio.ByteBuffer wrapUnsigned​(@org.checkerframework.checker.signedness.qual.Unsigned byte[] array, int offset, int length)
      Wraps an unsigned byte array into a ByteBuffer.
      static void writeUnsigned​(java.io.RandomAccessFile f, @org.checkerframework.checker.signedness.qual.Unsigned byte[] bs, int off, int len)
      Writes len unsigned bytes to the RandomAccessFile f at offset off.
      static void writeUnsignedByte​(java.io.RandomAccessFile f, @org.checkerframework.checker.signedness.qual.Unsigned byte b)
      Writes an unsigned byte to the RandomAccessFile f.
      static void writeUnsignedChar​(java.io.RandomAccessFile f, @org.checkerframework.checker.signedness.qual.Unsigned char c)
      Writes an unsigned char to the RandomAccessFile f.
      static void writeUnsignedInt​(java.io.RandomAccessFile f, @org.checkerframework.checker.signedness.qual.Unsigned int i)
      Writes an unsigned byte to the RandomAccessFile f.
      static void writeUnsignedLong​(java.io.RandomAccessFile f, @org.checkerframework.checker.signedness.qual.Unsigned long l)
      Writes an unsigned byte to the RandomAccessFile f.
      static void writeUnsignedShort​(java.io.RandomAccessFile f, @org.checkerframework.checker.signedness.qual.Unsigned short s)
      Writes an unsigned short to the RandomAccessFile f.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • wrapUnsigned

        public static java.nio.ByteBuffer wrapUnsigned​(@org.checkerframework.checker.signedness.qual.Unsigned byte[] array)
        Wraps an unsigned byte array into a ByteBuffer. This method is a wrapper around wrap(byte[]), but assumes that the input should be interpreted as unsigned.
      • wrapUnsigned

        public static java.nio.ByteBuffer wrapUnsigned​(@org.checkerframework.checker.signedness.qual.Unsigned byte[] array,
                                                       int offset,
                                                       int length)
        Wraps an unsigned byte array into a ByteBuffer. This method is a wrapper around wrap(byte[], int, int), but assumes that the input should be interpreted as unsigned.
      • getUnsignedInt

        public static @org.checkerframework.checker.signedness.qual.Unsigned int getUnsignedInt​(java.nio.ByteBuffer b)
        Gets an unsigned int from the ByteBuffer b. This method is a wrapper around getInt(), but assumes that the result should be interpreted as unsigned.
      • getUnsignedShort

        public static @org.checkerframework.checker.signedness.qual.Unsigned short getUnsignedShort​(java.nio.ByteBuffer b)
        Gets an unsigned short from the ByteBuffer b. This method is a wrapper around getShort(), but assumes that the result should be interpreted as unsigned.
      • getUnsigned

        public static @org.checkerframework.checker.signedness.qual.Unsigned byte getUnsigned​(java.nio.ByteBuffer b)
        Gets an unsigned byte from the ByteBuffer b. This method is a wrapper around get(), but assumes that the result should be interpreted as unsigned.
      • getUnsigned

        public static @org.checkerframework.checker.signedness.qual.Unsigned byte getUnsigned​(java.nio.ByteBuffer b,
                                                                                              int i)
        Gets an unsigned byte from the ByteBuffer b at i. This method is a wrapper around get(int), but assumes that the result should be interpreted as unsigned.
      • getUnsigned

        public static java.nio.ByteBuffer getUnsigned​(java.nio.ByteBuffer b,
                                                      byte[] bs,
                                                      int i,
                                                      int l)
        Populates an unsigned byte array from the ByteBuffer b at i with l bytes. This method is a wrapper around get(byte[], int, int), but assumes that the bytes should be interpreted as unsigned.
      • putUnsigned

        public static java.nio.ByteBuffer putUnsigned​(java.nio.ByteBuffer b,
                                                      @org.checkerframework.checker.signedness.qual.Unsigned byte ubyte)
        Places an unsigned byte into the ByteBuffer b. This method is a wrapper around put(byte), but assumes that the input should be interpreted as unsigned.
      • putUnsigned

        public static java.nio.ByteBuffer putUnsigned​(java.nio.ByteBuffer b,
                                                      int i,
                                                      @org.checkerframework.checker.signedness.qual.Unsigned byte ubyte)
        Places an unsigned byte into the ByteBuffer b at i. This method is a wrapper around put(int, byte), but assumes that the input should be interpreted as unsigned.
      • putUnsigned

        public static java.nio.IntBuffer putUnsigned​(java.nio.IntBuffer b,
                                                     @org.checkerframework.checker.signedness.qual.Unsigned int uint)
        Places an unsigned int into the IntBuffer b. This method is a wrapper around put(int), but assumes that the input should be interpreted as unsigned.
      • putUnsigned

        public static java.nio.IntBuffer putUnsigned​(java.nio.IntBuffer b,
                                                     int i,
                                                     @org.checkerframework.checker.signedness.qual.Unsigned int uint)
        Places an unsigned int into the IntBuffer b at i. This method is a wrapper around put(int, int), but assumes that the input should be interpreted as unsigned.
      • putUnsigned

        public static java.nio.IntBuffer putUnsigned​(java.nio.IntBuffer b,
                                                     @org.checkerframework.checker.signedness.qual.Unsigned int[] uints)
        Places an unsigned int array into the IntBuffer b. This method is a wrapper around put(int[]), but assumes that the input should be interpreted as unsigned.
      • putUnsigned

        public static java.nio.IntBuffer putUnsigned​(java.nio.IntBuffer b,
                                                     @org.checkerframework.checker.signedness.qual.Unsigned int[] uints,
                                                     int i,
                                                     int l)
        Places an unsigned int array into the IntBuffer b at i with length l. This method is a wrapper around put(int[], int, int), but assumes that the input should be interpreted as unsigned.
      • getUnsigned

        public static @org.checkerframework.checker.signedness.qual.Unsigned int getUnsigned​(java.nio.IntBuffer b,
                                                                                             int i)
        Gets an unsigned int from the IntBuffer b at i. This method is a wrapper around get(int), but assumes that the output should be interpreted as unsigned.
      • putUnsignedShort

        public static java.nio.ByteBuffer putUnsignedShort​(java.nio.ByteBuffer b,
                                                           @org.checkerframework.checker.signedness.qual.Unsigned short ushort)
        Places an unsigned short into the ByteBuffer b. This method is a wrapper around putShort(short), but assumes that the input should be interpreted as unsigned.
      • putUnsignedShort

        public static java.nio.ByteBuffer putUnsignedShort​(java.nio.ByteBuffer b,
                                                           int i,
                                                           @org.checkerframework.checker.signedness.qual.Unsigned short ushort)
        Places an unsigned short into the ByteBuffer b at i. This method is a wrapper around putShort(int, short), but assumes that the input should be interpreted as unsigned.
      • putUnsignedInt

        public static java.nio.ByteBuffer putUnsignedInt​(java.nio.ByteBuffer b,
                                                         @org.checkerframework.checker.signedness.qual.Unsigned int uint)
        Places an unsigned int into the ByteBuffer b. This method is a wrapper around putInt(int), but assumes that the input should be interpreted as unsigned.
      • putUnsignedInt

        public static java.nio.ByteBuffer putUnsignedInt​(java.nio.ByteBuffer b,
                                                         int i,
                                                         @org.checkerframework.checker.signedness.qual.Unsigned int uint)
        Places an unsigned int into the ByteBuffer b at i. This method is a wrapper around putInt(int, int), but assumes that the input should be interpreted as unsigned.
      • putUnsignedLong

        public static java.nio.ByteBuffer putUnsignedLong​(java.nio.ByteBuffer b,
                                                          int i,
                                                          @org.checkerframework.checker.signedness.qual.Unsigned long ulong)
        Places an unsigned long into the ByteBuffer b at i. This method is a wrapper around putLong(int, long), but assumes that the input should be interpreted as unsigned.
      • readUnsignedChar

        public static @org.checkerframework.checker.signedness.qual.Unsigned char readUnsignedChar​(java.io.RandomAccessFile f)
                                                                                            throws java.io.IOException
        Reads an unsigned char from the RandomAccessFile f. This method is a wrapper around readChar(), but assumes the output should be interpreted as unsigned.
        Throws:
        java.io.IOException
      • readUnsignedInt

        public static @org.checkerframework.checker.signedness.qual.Unsigned int readUnsignedInt​(java.io.RandomAccessFile f)
                                                                                          throws java.io.IOException
        Reads an unsigned int from the RandomAccessFile f. This method is a wrapper around readInt(), but assumes the output should be interpreted as unsigned.
        Throws:
        java.io.IOException
      • readUnsignedLong

        public static @org.checkerframework.checker.signedness.qual.Unsigned long readUnsignedLong​(java.io.RandomAccessFile f)
                                                                                            throws java.io.IOException
        Reads an unsigned long from the RandomAccessFile f. This method is a wrapper around readLong(), but assumes the output should be interpreted as unsigned.
        Throws:
        java.io.IOException
      • readUnsigned

        public static int readUnsigned​(java.io.RandomAccessFile f,
                                       @org.checkerframework.checker.signedness.qual.Unsigned byte[] b,
                                       int off,
                                       int len)
                                throws java.io.IOException
        Reads up to len bytes of data from this file into an unsigned array of bytes. This method is a wrapper around read(byte[], int, int), but assumes the output should be interpreted as unsigned.
        Throws:
        java.io.IOException
      • readFullyUnsigned

        public static void readFullyUnsigned​(java.io.RandomAccessFile f,
                                             @org.checkerframework.checker.signedness.qual.Unsigned byte[] b)
                                      throws java.io.IOException
        Reads a file fully into an unsigned byte array. This method is a wrapper around readFully(byte[]), but assumes the output should be interpreted as unsigned.
        Throws:
        java.io.IOException
      • writeUnsigned

        public static void writeUnsigned​(java.io.RandomAccessFile f,
                                         @org.checkerframework.checker.signedness.qual.Unsigned byte[] bs,
                                         int off,
                                         int len)
                                  throws java.io.IOException
        Writes len unsigned bytes to the RandomAccessFile f at offset off. This method is a wrapper around write(byte[], int, int), but assumes the input should be interpreted as unsigned.
        Throws:
        java.io.IOException
      • writeUnsignedByte

        public static void writeUnsignedByte​(java.io.RandomAccessFile f,
                                             @org.checkerframework.checker.signedness.qual.Unsigned byte b)
                                      throws java.io.IOException
        Writes an unsigned byte to the RandomAccessFile f. This method is a wrapper around writeByte(int), but assumes the input should be interpreted as unsigned.
        Throws:
        java.io.IOException
      • writeUnsignedChar

        public static void writeUnsignedChar​(java.io.RandomAccessFile f,
                                             @org.checkerframework.checker.signedness.qual.Unsigned char c)
                                      throws java.io.IOException
        Writes an unsigned char to the RandomAccessFile f. This method is a wrapper around writeChar(int), but assumes the input should be interpreted as unsigned.
        Throws:
        java.io.IOException
      • writeUnsignedShort

        public static void writeUnsignedShort​(java.io.RandomAccessFile f,
                                              @org.checkerframework.checker.signedness.qual.Unsigned short s)
                                       throws java.io.IOException
        Writes an unsigned short to the RandomAccessFile f. This method is a wrapper around writeShort(int), but assumes the input should be interpreted as unsigned.
        Throws:
        java.io.IOException
      • writeUnsignedInt

        public static void writeUnsignedInt​(java.io.RandomAccessFile f,
                                            @org.checkerframework.checker.signedness.qual.Unsigned int i)
                                     throws java.io.IOException
        Writes an unsigned byte to the RandomAccessFile f. This method is a wrapper around writeInt(int), but assumes the input should be interpreted as unsigned.
        Throws:
        java.io.IOException
      • writeUnsignedLong

        public static void writeUnsignedLong​(java.io.RandomAccessFile f,
                                             @org.checkerframework.checker.signedness.qual.Unsigned long l)
                                      throws java.io.IOException
        Writes an unsigned byte to the RandomAccessFile f. This method is a wrapper around writeLong(long), but assumes the input should be interpreted as unsigned.
        Throws:
        java.io.IOException
      • getUnsigned

        public static void getUnsigned​(java.nio.ByteBuffer b,
                                       @org.checkerframework.checker.signedness.qual.Unsigned byte[] bs)
        Gets an array of unsigned bytes from the ByteBuffer b and stores them in the array bs. This method is a wrapper around get(byte[]), but assumes that the array of bytes should be interpreted as unsigned.
      • compareUnsigned

        public static int compareUnsigned​(@org.checkerframework.checker.signedness.qual.Unsigned short x,
                                          @org.checkerframework.checker.signedness.qual.Unsigned short y)
        Compares two unsigned shorts x and y.

        In Java 11 or later, use Short.compareUnsigned.

        Parameters:
        x - the first value to compare
        y - the second value to compare
        Returns:
        a negative number iff x < y, a positive number iff x > y, and zero iff x == y.
      • compareUnsigned

        public static int compareUnsigned​(@org.checkerframework.checker.signedness.qual.Unsigned byte x,
                                          @org.checkerframework.checker.signedness.qual.Unsigned byte y)
        Compares two unsigned bytes x and y.

        In Java 11 or later, use Byte.compareUnsigned.

        Parameters:
        x - the first value to compare
        y - the second value to compare
        Returns:
        a negative number iff x < y, a positive number iff x > y, and zero iff x == y.
      • toUnsignedString

        public static java.lang.String toUnsignedString​(@org.checkerframework.checker.signedness.qual.Unsigned short s)
        Produces a string representation of the unsigned short s.
      • toUnsignedString

        public static java.lang.String toUnsignedString​(@org.checkerframework.checker.signedness.qual.Unsigned short s,
                                                        int radix)
        Produces a string representation of the unsigned short s in base radix.
      • toUnsignedString

        public static java.lang.String toUnsignedString​(@org.checkerframework.checker.signedness.qual.Unsigned byte b)
        Produces a string representation of the unsigned byte b.
      • toUnsignedString

        public static java.lang.String toUnsignedString​(@org.checkerframework.checker.signedness.qual.Unsigned byte b,
                                                        int radix)
        Produces a string representation of the unsigned byte b in base radix.
      • toUnsignedShort

        public static @org.checkerframework.checker.signedness.qual.Unsigned short toUnsignedShort​(@org.checkerframework.checker.signedness.qual.Unsigned byte b)
        Returns an unsigned short representing the same value as an unsigned byte.
      • toUnsignedLong

        public static @org.checkerframework.checker.signedness.qual.Unsigned long toUnsignedLong​(@org.checkerframework.checker.signedness.qual.Unsigned char c)
        Returns an unsigned long representing the same value as an unsigned char.
      • toUnsignedInt

        public static @org.checkerframework.checker.signedness.qual.Unsigned int toUnsignedInt​(@org.checkerframework.checker.signedness.qual.Unsigned char c)
        Returns an unsigned int representing the same value as an unsigned char.
      • toUnsignedShort

        public static @org.checkerframework.checker.signedness.qual.Unsigned short toUnsignedShort​(@org.checkerframework.checker.signedness.qual.Unsigned char c)
        Returns an unsigned short representing the same value as an unsigned char.
      • toFloat

        public static float toFloat​(@org.checkerframework.checker.signedness.qual.Unsigned byte b)
        Returns a float representing the same value as the unsigned byte.
      • toFloat

        public static float toFloat​(@org.checkerframework.checker.signedness.qual.Unsigned short s)
        Returns a float representing the same value as the unsigned short.
      • toFloat

        public static float toFloat​(@org.checkerframework.checker.signedness.qual.Unsigned int i)
        Returns a float representing the same value as the unsigned int.
      • toFloat

        public static float toFloat​(@org.checkerframework.checker.signedness.qual.Unsigned long l)
        Returns a float representing the same value as the unsigned long.
      • toDouble

        public static double toDouble​(@org.checkerframework.checker.signedness.qual.Unsigned byte b)
        Returns a double representing the same value as the unsigned byte.
      • toDouble

        public static double toDouble​(@org.checkerframework.checker.signedness.qual.Unsigned short s)
        Returns a double representing the same value as the unsigned short.
      • toDouble

        public static double toDouble​(@org.checkerframework.checker.signedness.qual.Unsigned int i)
        Returns a double representing the same value as the unsigned int.
      • toDouble

        public static double toDouble​(@org.checkerframework.checker.signedness.qual.Unsigned long l)
        Returns a double representing the same value as the unsigned long.
      • byteFromFloat

        public static @org.checkerframework.checker.signedness.qual.Unsigned byte byteFromFloat​(float f)
        Returns an unsigned byte representing the same value as the float.
      • shortFromFloat

        public static @org.checkerframework.checker.signedness.qual.Unsigned short shortFromFloat​(float f)
        Returns an unsigned short representing the same value as the float.
      • intFromFloat

        public static @org.checkerframework.checker.signedness.qual.Unsigned int intFromFloat​(float f)
        Returns an unsigned int representing the same value as the float.
      • longFromFloat

        public static @org.checkerframework.checker.signedness.qual.Unsigned long longFromFloat​(float f)
        Returns an unsigned long representing the same value as the float.
      • byteFromDouble

        public static @org.checkerframework.checker.signedness.qual.Unsigned byte byteFromDouble​(double d)
        Returns an unsigned byte representing the same value as the double.
      • shortFromDouble

        public static @org.checkerframework.checker.signedness.qual.Unsigned short shortFromDouble​(double d)
        Returns an unsigned short representing the same value as the double.
      • intFromDouble

        public static @org.checkerframework.checker.signedness.qual.Unsigned int intFromDouble​(double d)
        Returns an unsigned int representing the same value as the double.
      • longFromDouble

        public static @org.checkerframework.checker.signedness.qual.Unsigned long longFromDouble​(double d)
        Returns an unsigned long representing the same value as the double.