Package adams.core

Class DefaultCompare

    • Constructor Detail

      • DefaultCompare

        public DefaultCompare()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Returns:
        a description suitable for displaying in the gui
      • compare

        public int compare​(Comparable o1,
                           Comparable o2)
        Compares its two arguments for order.
        Specified by:
        compare in interface Comparator<Comparable>
        Parameters:
        o1 - the first object
        o2 - the second object
        Returns:
        -1 if o1<o2, 0 if o1=o2 and 1 if o1&;gt;o2
      • equals

        public boolean equals​(Object obj)
        Indicates whether some other object is "equal to" this Comparator.
        Specified by:
        equals in interface Comparator<Comparable>
        Overrides:
        equals in class Object
        Parameters:
        obj - the object to compare with this Comparator
        Returns:
        true if the object is a DefaultCompare object as well