Class Serial


  • public class Serial
    extends Object
    This class provides basic serial number comparisons as defined in RFC 1982.
    • Method Detail

      • compare

        public static int compare​(int s1,
                                  int s2)
        Compares two numbers using serial arithmetic.
        Parameters:
        s1 - the first serial number
        s2 - the second serial number
        Returns:
        a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second
      • lt

        public static boolean lt​(int s1,
                                 int s2)
      • le

        public static boolean le​(int s1,
                                 int s2)
      • gt

        public static boolean gt​(int s1,
                                 int s2)
      • ge

        public static boolean ge​(int s1,
                                 int s2)
      • eq

        public static boolean eq​(int s1,
                                 int s2)
      • min

        public static int min​(int s1,
                              int s2)
      • max

        public static int max​(int s1,
                              int s2)