Package org.springframework.data.domain
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 org.springframework.data.domain.Sort
Sort.Direction, Sort.NullHandling, Sort.Order, Sort.TypedSort<T> -
Field Summary
Fields inherited from class org.springframework.data.domain.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 org.springframework.data.domain.Sort
and, by, by, by, by, doReverse, equals, getOrderFor, hashCode, isSorted, isUnsorted, reverse, sort, unsortedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
by
-
by
public <S> Sort.TypedSort<S> by(MethodInvocationRecorder.Recorded.ToCollectionConverter<T, S> collectionProperty) -
by
-
ascending
Description copied from class:SortReturns a newSortwith the current setup but ascending order direction. -
descending
Description copied from class:SortReturns a newSortwith the current setup but descending order direction.- Overrides:
descendingin classSort- Returns:
-
iterator
-
isEmpty
public boolean isEmpty()Description copied from interface:StreamableReturns whether the currentStreamableis empty.- Specified by:
isEmptyin interfaceStreamable<T>- Overrides:
isEmptyin classSort- Returns:
-
toString
-