it.tidalwave.util
Interface Finder.FilterSortCriterion<Type>

Package class diagram package Finder.FilterSortCriterion
All Superinterfaces:
Finder.SortCriterion
All Known Implementing Classes:
DefaultFilterSortCriterion
Enclosing interface:
Finder<Type>

public static interface Finder.FilterSortCriterion<Type>
extends Finder.SortCriterion

An interface that should be implemented by specific Finder.SortCriterion objects which are capable to implement by themselves the sorting of objects, by post-processing an existing collection of objects. While this is often convenient, it is possible for it to be inefficient in cases in which the original source of objects is capable to perform the sort in an optimized way (e.g. a SQL database by means of ORDER BY}. The facility class FinderSupport supports FilterSortCriterion objects out of the box. A convenient partial implementation of FilterSortCriterion is DefaultFilterSortCriterion.


Field Summary
 
Fields inherited from interface it.tidalwave.util.Finder.SortCriterion
DEFAULT, SortCriterion, UNSORTED
 
Method Summary
 void sort(List<? extends Type> results, Finder.SortDirection sortDirection)
          Performs the sort of results.
 

Method Detail

sort

@Nonnull
void sort(@Nonnull
                  List<? extends Type> results,
                  @Nonnull
                  Finder.SortDirection sortDirection)
Performs the sort of results.

Parameters:
results - the list of objects to be sorted in place
sortDirection - the sort direction


Copyright © 2009-2012 Tidalwave s.a.s.. All Rights Reserved.