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 newSort
with 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 newSort
with the current setup but descending order direction.boolean
isEmpty()
Returns whether the currentStreamable
is 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, unsorted
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:Sort
Returns a newSort
with the current setup but ascending order direction. -
descending
Description copied from class:Sort
Returns a newSort
with the current setup but descending order direction.- Overrides:
descending
in classSort
- Returns:
- a new
Sort
with the current setup but descending order direction.
-
iterator
-
isEmpty
public boolean isEmpty()Description copied from interface:Streamable
Returns whether the currentStreamable
is empty.- Specified by:
isEmpty
in interfaceStreamable<T>
- Overrides:
isEmpty
in classSort
- Returns:
-
toString
-