Class Sort.TypedSort<T>
java.lang.Object
org.springframework.data.domain.Sort
org.springframework.data.domain.Sort.TypedSort<T>
- All Implemented Interfaces:
Serializable, Iterable<Sort.Order>, Supplier<Stream<Sort.Order>>, Streamable<Sort.Order>
- Enclosing class:
Sort
Extension of Sort to use method handles to define properties to sort by.
- Since:
- 2.2
- Author:
- Oliver Gierke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Sort
Sort.Direction, Sort.NullHandling, Sort.Order, Sort.TypedSort<T> -
Field Summary
Fields inherited from class Sort
DEFAULT_DIRECTION -
Method Summary
Modifier and TypeMethodDescriptionReturns a newSortwith the current setup but ascending order direction.<S> Sort.TypedSort<S> <S> Sort.TypedSort<S> by(MethodInvocationRecorder.Recorded.ToCollectionConverter<T, S> collectionProperty) <S> Sort.TypedSort<S> by(MethodInvocationRecorder.Recorded.ToMapConverter<T, S> mapProperty) Returns a newSortwith the current setup but descending order direction.booleanisEmpty()Returns whether the currentStreamableis empty.iterator()toString()Methods inherited from class Sort
and, by, by, by, by, doReverse, equals, getOrderFor, hashCode, isSorted, isUnsorted, reverse, sort, unsortedMethods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
by
-
by
public <S> Sort.TypedSort<S> by(MethodInvocationRecorder.Recorded.ToCollectionConverter<T, S> collectionProperty) -
by
-
ascending
-
descending
-
iterator
-
isEmpty
public boolean isEmpty()Description copied from interface:StreamableReturns whether the currentStreamableis empty.- Specified by:
isEmptyin interfaceStreamable<T>- Overrides:
isEmptyin classSort- Returns:
-
toString
-