com.vaadin.flow.data.provider.
Class SortOrderBuilder<T extends SortOrder<V>,V>
Type Parameters:
T
- the sort order type
V
- the sorting type
All Implemented Interfaces:
Direct Known Subclasses:
Base class for helper classes with fluent API for constructing sort order
lists. When the sort order is ready to be passed on, calling build()
will create the list of sort orders.
Since:
1.0
See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns an unmodifiable copy of the list of current sort orders in this sort builder.
protected abstract T
createSortOrder
(V by, SortDirection direction) Creates a sort order object with the given parameters.
Appends sorting with ascending sort direction.
Appends sorting with descending sort direction.
-
Constructor Details
-
SortOrderBuilder
public SortOrderBuilder()
-
-
Method Details
-
thenAsc
Appends sorting with ascending sort direction.
Parameters:
by
- the object to sort byReturns:
this sort builder
-
thenDesc
Appends sorting with descending sort direction.
Parameters:
by
- the object to sort byReturns:
this sort builder
-
build
Returns an unmodifiable copy of the list of current sort orders in this sort builder.
Returns:
an unmodifiable sort order list
-
createSortOrder
Creates a sort order object with the given parameters.
Parameters:
by
- the object to sort bydirection
- the sort directionReturns:
the sort order object
-