Package it.tidalwave.role
Interface Sortable
-
public interface SortableThe role of an object that has contents that can be sorted.- Author:
- Fabrizio Giudici
- Status: stable API
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Class<Sortable>_Sortable_static SortableDEFAULTA defaultSortablewhich does nothing (useful for implementing the NullObject pattern).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Finder.SortCriteriongetSortCriterion()Returns the current sort criterion.Finder.SortDirectiongetSortDirection()Returns the current sort direction.voidsetSortCriterion(Finder.SortCriterion sortCriterion)Sets the sort criterion.voidsetSortDirection(Finder.SortDirection sortDirection)Sets the sort direction.
-
-
-
Field Detail
-
_Sortable_
static final java.lang.Class<Sortable> _Sortable_
-
DEFAULT
static final Sortable DEFAULT
A defaultSortablewhich does nothing (useful for implementing the NullObject pattern). This object always returnsFinder.SortCriterion.UNSORTEDassortCriterionandFinder.SortDirection.ASCENDINGassortDirection.
-
-
Method Detail
-
setSortCriterion
void setSortCriterion(@Nonnull Finder.SortCriterion sortCriterion)Sets the sort criterion.- Parameters:
sortCriterion- the sort criterion
-
setSortDirection
void setSortDirection(@Nonnull Finder.SortDirection sortDirection)Sets the sort direction.- Parameters:
sortDirection- the sort direction
-
getSortCriterion
@Nonnull Finder.SortCriterion getSortCriterion()
Returns the current sort criterion.- Returns:
- the sort criterion
-
getSortDirection
@Nonnull Finder.SortDirection getSortDirection()
Returns the current sort direction.- Returns:
- the sort direction
-
-