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 TypeMethodDescriptionPropertyPathComparator<@Nullable T> asc()Sort ascending.intPropertyPathComparator<@Nullable T> desc()Sort descending.protected <S> @Nullable ObjectgetCompareValue(S object, PropertyPath propertyPath) PropertyPathComparator<@Nullable T> Sort null values first.PropertyPathComparator<@Nullable T> 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
- Specified by:
comparein interfaceComparator<T>
-
getCompareValue
-
asc
-
desc
-
nullsFirst
Sort null values first.- Returns:
-
nullsLast
Sort null values last.- Returns:
-