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
FieldsModifier and TypeFieldDescriptionstatic final SortableA defaultSortablewhich does nothing (useful for implementing the NullObject pattern). -
Method Summary
Modifier and TypeMethodDescriptionReturns the current sort criterion.Returns the current sort direction.voidsetSortCriterion(Finder.SortCriterion sortCriterion) Sets the sort criterion.voidsetSortDirection(Finder.SortDirection sortDirection) Sets the sort direction.
-
Field Details
-
_Sortable_
-
DEFAULT
A defaultSortablewhich does nothing (useful for implementing the NullObject pattern). This object always returnsFinder.SortCriterion.UNSORTEDassortCriterionandFinder.SortDirection.ASCENDINGassortDirection.
-
-
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
-