Package com.blazebit.persistence.view
Class Sorters
java.lang.Object
com.blazebit.persistence.view.Sorters
A utility class that provides methods to create standard sorters.
- Since:
- 1.0.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and TypeMethodDescriptionstatic SorterLikeascending(boolean)but withnullsFirstset to false.static Sorterascending(boolean nullsFirst) Likesorter(boolean, boolean)but withascendingset to true.static SorterLikedescending(boolean)but withnullsFirstset to false.static Sorterdescending(boolean nullsFirst) Likesorter(boolean, boolean)but withascendingset to false.static Sortersorter(boolean ascending, boolean nullsFirst) Creates and returns a newSorter.
-
Method Details
-
sorter
Creates and returns a newSorter. The sorter has the following properties- sorts ascending if the flag
ascendingis true, descending otherwise - sorts nulls first is the flag
nullsFirstis ture, nulls last otherwise
- Parameters:
ascending- If true sorts ascending, otherwise descendingnullsFirst- If true sorts nulls first, otherwise nulls last- Returns:
- A new sorter
- sorts ascending if the flag
-
ascending
Likesorter(boolean, boolean)but withascendingset to true.- Parameters:
nullsFirst- If true sorts nulls first, otherwise nulls last- Returns:
- A new sorter
-
descending
Likesorter(boolean, boolean)but withascendingset to false.- Parameters:
nullsFirst- If true sorts nulls first, otherwise nulls last- Returns:
- A new sorter
-
ascending
Likeascending(boolean)but withnullsFirstset to false.- Returns:
- A new sorter
-
descending
Likedescending(boolean)but withnullsFirstset to false.- Returns:
- A new sorter
-