Class PropertyPathComparator<T>
java.lang.Object
org.springframework.data.keyvalue.core.PropertyPathComparator<T>
- All Implemented Interfaces:
Comparator<T>
Comparator implementation to compare objects based on a PropertyPath. This comparator obtains the
value at PropertyPath from the given comparison objects and then performs
the comparison.- Since:
- 3.1.10
- Author:
- Christoph Strobl, Mark Paluch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasc()Sort ascending.intdesc()Sort descending.getCompareValue(S object, PropertyPath propertyPath) Sort null values first.Sort null values last.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
PropertyPathComparator
-
-
Method Details
-
compare
-
getCompareValue
-
asc
-
desc
-
nullsFirst
Sort null values first.- Returns:
-
nullsLast
Sort null values last.- Returns:
-