Package com.avoka.core.util
Class PropertyComparatorDesc
- java.lang.Object
-
- com.avoka.core.util.PropertyComparator
-
- com.avoka.core.util.PropertyComparatorDesc
-
- All Implemented Interfaces:
Comparator
- Direct Known Subclasses:
IDPropertyComparatorDesc
public class PropertyComparatorDesc extends PropertyComparator
Provides a object property string comparator that sorts the list in descending property order.- Since:
- 4.0.0
-
-
Field Summary
-
Fields inherited from class com.avoka.core.util.PropertyComparator
comparator, property
-
-
Constructor Summary
Constructors Constructor Description PropertyComparatorDesc()
Create a new string comparator, comparing the specified object.PropertyComparatorDesc(String property)
Create a new string comparator, comparing the specified object property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Object object1, Object object2)
Calls super with the object parameters reversed-
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
-
PropertyComparatorDesc
public PropertyComparatorDesc(String property)
Create a new string comparator, comparing the specified object property.- Parameters:
property
- the name of the property to compare
-
PropertyComparatorDesc
public PropertyComparatorDesc()
Create a new string comparator, comparing the specified object.
-
-
Method Detail
-
compare
public int compare(Object object1, Object object2)
Calls super with the object parameters reversed- Specified by:
compare
in interfaceComparator
- Overrides:
compare
in classPropertyComparator
- Parameters:
object1
- the first object to compareobject2
- the second object to compare- Returns:
- the comparison result
- See Also:
Comparator.compare(Object, Object)
-
-