Class SpecificComparator

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Comparator<java.lang.String>

    public class SpecificComparator
    extends java.lang.Object
    implements java.util.Comparator<java.lang.String>, java.io.Serializable
    This class is used to compare Specific object from the config SNMP package.
    Author:
    David Hustace
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(java.lang.String spec1, java.lang.String spec2)
      returns the difference of spec1 - spec2
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • SpecificComparator

        public SpecificComparator()
    • Method Detail

      • compare

        public int compare​(java.lang.String spec1,
                           java.lang.String spec2)
        returns the difference of spec1 - spec2
        Specified by:
        compare in interface java.util.Comparator<java.lang.String>
        Parameters:
        spec1 - a String object.
        spec2 - a String object.
        Returns:
        -1 for spec1 < spec2, 0 for spec1 == spec2, 1 for spec1 > spec2