it.tidalwave.util
Class DefaultFilterSortCriterion<Type>
java.lang.Object
it.tidalwave.util.DefaultFilterSortCriterion<Type>
- All Implemented Interfaces:
- Finder.FilterSortCriterion<Type>, Finder.SortCriterion, Serializable
public class DefaultFilterSortCriterion<Type>
- extends Object
- implements Finder.FilterSortCriterion<Type>, Serializable
A default implementation of Finder.FilterSortCriterion
which relies on sorting capabilities of the Java
runtime library and only needs a Comparator
to be specified.
- Version:
- $Id$
- Author:
- Fabrizio Giudici
- See Also:
- Serialized Form
- Status: draft API
DefaultFilterSortCriterion
public DefaultFilterSortCriterion(@Nonnull
Comparator<? super Type> comparator,
@Nonnull
String name)
- Creates an instance that will use the given
Comparator
, with the given name (used for diagnostics).
- Parameters:
comparator
- the comparatorname
- a name used for diagnostics
DefaultFilterSortCriterion
protected DefaultFilterSortCriterion(@Nonnull
Comparator<? super Type> comparator)
- Creates an instance that will use the given
Comparator
.
- Parameters:
comparator
- the comparator
sort
@Nonnull
public void sort(@Nonnull
List<? extends Type> results,
@Nonnull
Finder.SortDirection sortDirection)
- Performs the sort of results.
- Specified by:
sort
in interface Finder.FilterSortCriterion<Type>
- Parameters:
results
- the list of objects to be sorted in placesortDirection
- the sort direction
toString
@Nonnull
public String toString()
-
- Overrides:
toString
in class Object
Copyright © 2009-2012 Tidalwave s.a.s.. All Rights Reserved.