Class Serial


  • public class Serial
    extends java.lang.Object
    This class provides basic serial number comparisons as defined in RFC 1982.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Comparator<java.lang.Integer> COMPARATOR  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int compare​(int s1, int s2)
      Compares two numbers using serial arithmetic.
      static boolean eq​(int s1, int s2)  
      static boolean ge​(int s1, int s2)  
      static boolean gt​(int s1, int s2)  
      static boolean le​(int s1, int s2)  
      static boolean lt​(int s1, int s2)  
      static int max​(int s1, int s2)  
      static int min​(int s1, int s2)  
      • Methods inherited from class java.lang.Object

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

      • COMPARATOR

        public static final java.util.Comparator<java.lang.Integer> COMPARATOR
    • Method Detail

      • compare

        public static final 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 final boolean lt​(int s1,
                                       int s2)
      • le

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

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

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

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

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

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