Class StringComparator

java.lang.Object
com.avoka.fc.core.util.StringComparator
All Implemented Interfaces:
Comparator

@Deprecated public class StringComparator extends Object implements Comparator
Deprecated.
use PropertyComparator instead, or VersionComparator for semantic version number comparison
Provides a object property string comparator. Comparison is done by retrieving the property values for both objects, then comparing them (ignoring case) using a StringComparator.
See Also:
  • Constructor Details

    • 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 Details

    • 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: