Package generic.util

Class UnsignedDataUtils


  • public class UnsignedDataUtils
    extends java.lang.Object
    A class for performing unsigned comparisons of java primitives.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)
      Simple test for the Comp class.
      static boolean unsignedGreaterThan​(byte i, byte j)
      Returns true if i is GREATER THAN j.
      static boolean unsignedGreaterThan​(int i, int j)
      Returns true if i is GREATER THAN j.
      static boolean unsignedGreaterThan​(long i, long j)
      Returns true if i is GREATER THAN j.
      static boolean unsignedGreaterThan​(short i, short j)
      Returns true if i is GREATER THAN j.
      static boolean unsignedGreaterThanOrEqual​(byte i, byte j)
      Returns true if i is GREATER THAN or EQUAL TO j.
      static boolean unsignedGreaterThanOrEqual​(int i, int j)
      Returns true if i is GREATER THAN or EQUAL TO j.
      static boolean unsignedGreaterThanOrEqual​(long i, long j)
      Returns true if i is GREATER THAN or EQUAL TO j.
      static boolean unsignedGreaterThanOrEqual​(short i, short j)
      Returns true if i is GREATER THAN or EQUAL TO j.
      static boolean unsignedLessThan​(byte i, byte j)
      Returns true if i is LESS THAN j.
      static boolean unsignedLessThan​(int i, int j)
      Returns true if i is LESS THAN j.
      static boolean unsignedLessThan​(long i, long j)
      Returns true if i is LESS THAN j.
      static boolean unsignedLessThan​(short i, short j)
      Returns true if i is LESS THAN j.
      static boolean unsignedLessThanOrEqual​(byte i, byte j)
      Returns true if i is LESS THAN or EQUAL TO j.
      static boolean unsignedLessThanOrEqual​(int i, int j)
      Returns true if i is LESS THAN or EQUAL TO j.
      static boolean unsignedLessThanOrEqual​(long i, long j)
      Returns true if i is LESS THAN or EQUAL TO j.
      static boolean unsignedLessThanOrEqual​(short i, short j)
      Returns true if i is LESS THAN or EQUAL TO j.
      • Methods inherited from class java.lang.Object

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

      • main

        public static void main​(java.lang.String[] args)
        Simple test for the Comp class.
        Parameters:
        args - not used
      • unsignedLessThan

        public static boolean unsignedLessThan​(byte i,
                                               byte j)
        Returns true if i is LESS THAN j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is less than j
      • unsignedLessThanOrEqual

        public static boolean unsignedLessThanOrEqual​(byte i,
                                                      byte j)
        Returns true if i is LESS THAN or EQUAL TO j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is less than or equal to j
      • unsignedGreaterThan

        public static boolean unsignedGreaterThan​(byte i,
                                                  byte j)
        Returns true if i is GREATER THAN j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is greater than j
      • unsignedGreaterThanOrEqual

        public static boolean unsignedGreaterThanOrEqual​(byte i,
                                                         byte j)
        Returns true if i is GREATER THAN or EQUAL TO j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is greater than or equal to j
      • unsignedLessThan

        public static boolean unsignedLessThan​(short i,
                                               short j)
        Returns true if i is LESS THAN j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is less than j
      • unsignedLessThanOrEqual

        public static boolean unsignedLessThanOrEqual​(short i,
                                                      short j)
        Returns true if i is LESS THAN or EQUAL TO j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is less than or equal to j
      • unsignedGreaterThan

        public static boolean unsignedGreaterThan​(short i,
                                                  short j)
        Returns true if i is GREATER THAN j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is greater than j
      • unsignedGreaterThanOrEqual

        public static boolean unsignedGreaterThanOrEqual​(short i,
                                                         short j)
        Returns true if i is GREATER THAN or EQUAL TO j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is greater than or equal to j
      • unsignedLessThan

        public static boolean unsignedLessThan​(int i,
                                               int j)
        Returns true if i is LESS THAN j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is less than j
      • unsignedLessThanOrEqual

        public static boolean unsignedLessThanOrEqual​(int i,
                                                      int j)
        Returns true if i is LESS THAN or EQUAL TO j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is less than or equal to j
      • unsignedGreaterThan

        public static boolean unsignedGreaterThan​(int i,
                                                  int j)
        Returns true if i is GREATER THAN j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is greater than j
      • unsignedGreaterThanOrEqual

        public static boolean unsignedGreaterThanOrEqual​(int i,
                                                         int j)
        Returns true if i is GREATER THAN or EQUAL TO j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is greater than or equal to j
      • unsignedLessThan

        public static boolean unsignedLessThan​(long i,
                                               long j)
        Returns true if i is LESS THAN j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is less than j
      • unsignedLessThanOrEqual

        public static boolean unsignedLessThanOrEqual​(long i,
                                                      long j)
        Returns true if i is LESS THAN or EQUAL TO j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        true if i is less than or equal to j
      • unsignedGreaterThan

        public static boolean unsignedGreaterThan​(long i,
                                                  long j)
        Returns true if i is GREATER THAN j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        return true if i is greater than j
      • unsignedGreaterThanOrEqual

        public static boolean unsignedGreaterThanOrEqual​(long i,
                                                         long j)
        Returns true if i is GREATER THAN or EQUAL TO j.
        Parameters:
        i - an argument
        j - another argument
        Returns:
        return true if i is greater than or equal to j