Package com.avoka.fc.core.util
Class StringComparator
- java.lang.Object
-
- com.avoka.fc.core.util.StringComparator
-
- All Implemented Interfaces:
Comparator
@Deprecated public class StringComparator extends Object implements Comparator
Deprecated.usePropertyComparator
instead, orVersionComparator
for semantic version number comparisonProvides a object property string comparator. Comparison is done by retrieving the property values for both objects, then comparing them (ignoring case) using aStringComparator
.- See Also:
StringComparator
-
-
Constructor Summary
Constructors Constructor Description StringComparator(String property)
Deprecated.Create a string property comparator, comparing the specified object property.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
compare(Object object1, Object object2)
Deprecated.Compare two objects-
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
-
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 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:
Comparator.compare(Object, Object)
-
-