Package it.tidalwave.role
Interface Sortable
public interface Sortable
The role of an object that has contents that can be sorted.
- Author:
- Fabrizio Giudici
- Status: stable API
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Sortable
A defaultSortable
which does nothing (useful for implementing the NullObject pattern). -
Method Summary
Modifier and TypeMethodDescriptionReturns the current sort criterion.Returns the current sort direction.void
setSortCriterion
(Finder.SortCriterion sortCriterion) Sets the sort criterion.void
setSortDirection
(Finder.SortDirection sortDirection) Sets the sort direction.
-
Field Details
-
_Sortable_
-
DEFAULT
A defaultSortable
which does nothing (useful for implementing the NullObject pattern). This object always returnsFinder.SortCriterion.UNSORTED
assortCriterion
andFinder.SortDirection.ASCENDING
assortDirection
.
-
-
Method Details
-
setSortCriterion
Sets the sort criterion.- Parameters:
sortCriterion
- the sort criterion
-
setSortDirection
Sets the sort direction.- Parameters:
sortDirection
- the sort direction
-
getSortCriterion
Returns the current sort criterion.- Returns:
- the sort criterion
-
getSortDirection
Returns the current sort direction.- Returns:
- the sort direction
-