Class SignednessUtilExtra

java.lang.Object
org.checkerframework.checker.signedness.util.SignednessUtilExtra

@AnnotatedFor("nullness") public class SignednessUtilExtra extends Object
Provides more static utility methods for unsigned values. These methods use Java packages not included in Android.

SignednessUtil has more methods that can be used anywhere, whereas SignednessUtilExtra can be used anywhere except on Android.

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

    Modifier and Type
    Method
    Description
    static @org.checkerframework.checker.signedness.qual.Unsigned int
    Gets the unsigned height of a Dimension.
    static @org.checkerframework.checker.signedness.qual.Unsigned int
    Gets the unsigned width of a Dimension.
    static @org.checkerframework.checker.signedness.qual.Unsigned int[]
    getUnsignedRGB(BufferedImage b, int startX, int startY, int w, int h, @org.checkerframework.checker.signedness.qual.Unsigned int[] rgbArray, int offset, int scansize)
    Gets rgb of BufferedImage b as unsigned ints.
    static void
    setUnsignedRGB(BufferedImage b, int startX, int startY, int w, int h, @org.checkerframework.checker.signedness.qual.Unsigned int[] rgbArray, int offset, int scansize)
    Sets rgb of BufferedImage b given unsigned ints.

    Methods inherited from class java.lang.Object

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

    • dimensionUnsignedWidth

      public static @org.checkerframework.checker.signedness.qual.Unsigned int dimensionUnsignedWidth(Dimension dim)
      Gets the unsigned width of a Dimension.
    • dimensionUnsignedHeight

      public static @org.checkerframework.checker.signedness.qual.Unsigned int dimensionUnsignedHeight(Dimension dim)
      Gets the unsigned height of a Dimension.
    • setUnsignedRGB

      public static void setUnsignedRGB(BufferedImage b, int startX, int startY, int w, int h, @org.checkerframework.checker.signedness.qual.Unsigned int[] rgbArray, int offset, int scansize)
      Sets rgb of BufferedImage b given unsigned ints. This method is a wrapper around setRGB(int, int, int, int, int[], int, int), but assumes that the input should be interpreted as unsigned.
    • getUnsignedRGB

      public static @org.checkerframework.checker.signedness.qual.Unsigned int[] getUnsignedRGB(BufferedImage b, int startX, int startY, int w, int h, @org.checkerframework.checker.signedness.qual.Unsigned int[] rgbArray, int offset, int scansize)
      Gets rgb of BufferedImage b as unsigned ints. This method is a wrapper around getRGB(int, int, int, int, int[], int, int), but assumes that the output should be interpreted as unsigned.