Class SignednessUtilExtra


  • @AnnotatedFor("nullness")
    public class SignednessUtilExtra
    extends java.lang.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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @org.checkerframework.checker.signedness.qual.Unsigned int dimensionUnsignedHeight​(java.awt.Dimension dim)
      Gets the unsigned height of a Dimension.
      static @org.checkerframework.checker.signedness.qual.Unsigned int dimensionUnsignedWidth​(java.awt.Dimension dim)
      Gets the unsigned width of a Dimension.
      static @org.checkerframework.checker.signedness.qual.Unsigned int[] getUnsignedRGB​(java.awt.image.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​(java.awt.image.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 Detail

      • dimensionUnsignedWidth

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

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

        public static void setUnsignedRGB​(java.awt.image.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​(java.awt.image.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.