Package com.avoka.fc.core.util
Class StringComparator
java.lang.Object
com.avoka.fc.core.util.StringComparator
- All Implemented Interfaces:
Comparator
Deprecated.
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 Summary
ConstructorDescriptionStringComparator
(String property) Deprecated.Create a string property comparator, comparing the specified object property. -
Method Summary
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 Details
-
StringComparator
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
Deprecated.Compare two objects- Specified by:
compare
in interfaceComparator
- 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:
-
PropertyComparator
instead, orVersionComparator
for semantic version number comparison