Class StringComparator

    • Constructor Detail

      • StringComparator

        public StringComparator​(String property)
        Deprecated.
        Create a string property comparator, comparing the specified object property.
        Parameters:
        property - the non-null name of the property to compare
    • Method Detail

      • compare

        public int compare​(Object object1,
                           Object object2)
        Deprecated.
        Compare two objects
        Specified by:
        compare in interface Comparator
        Parameters:
        object1 - the first object to be compared.
        object2 - the second object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
        Throws:
        ClassCastException - if the arguments' types prevent them from being compared by this Comparator.
        See Also:
        Comparator.compare(Object, Object)