Class UnsignedLong


  • public class UnsignedLong
    extends java.lang.Object
    This class provides methods to deal with unsigned long values in Java. Please note that it is just a helper class and not an equivalent to Long.
    Author:
    homac
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long MAX_VALUE  
      static long MIN_VALUE  
    • Constructor Summary

      Constructors 
      Constructor Description
      UnsignedLong()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int compare​(long ul1, long ul2)  
      static boolean eq​(long ul1, long ul2)  
      static boolean ge​(long ul1, long ul2)  
      static boolean gt​(long ul1, long ul2)  
      static boolean le​(long ul1, long ul2)  
      static boolean lt​(long ul1, long ul2)  
      static long minus​(long ul1, long ul2)  
      static long plus​(long ul1, long ul2)  
      • Methods inherited from class java.lang.Object

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

      • UnsignedLong

        public UnsignedLong()
    • Method Detail

      • compare

        public static int compare​(long ul1,
                                  long ul2)
      • minus

        public static long minus​(long ul1,
                                 long ul2)
        Parameters:
        ul1 -
        ul2 -
        Returns:
        ul1 - ul2
      • plus

        public static long plus​(long ul1,
                                long ul2)
        Parameters:
        ul1 -
        ul2 -
        Returns:
        ul1 + ul2
      • le

        public static boolean le​(long ul1,
                                 long ul2)
        Parameters:
        ul1 -
        ul2 -
        Returns:
        ul1 - ul2
      • lt

        public static boolean lt​(long ul1,
                                 long ul2)
        Parameters:
        ul1 -
        ul2 -
        Returns:
        ul1 < ul2
      • ge

        public static boolean ge​(long ul1,
                                 long ul2)
        Parameters:
        ul1 -
        ul2 -
        Returns:
        ul1 >= ul2
      • gt

        public static boolean gt​(long ul1,
                                 long ul2)
        Parameters:
        ul1 -
        ul2 -
        Returns:
        ul1 > ul2
      • eq

        public static boolean eq​(long ul1,
                                 long ul2)
        Parameters:
        ul1 -
        ul2 -
        Returns:
        ul1 == ul2