Package org.cyclos.server.utils
Class SortHelper
- java.lang.Object
-
- org.cyclos.server.utils.SortHelper
-
public final class SortHelper extends Object
Contains methods which should be inCollectionHelperbut can't be emulated by GWT
-
-
Constructor Summary
Constructors Constructor Description SortHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> List<T>sortBy(Collection<T> collection, com.querydsl.core.types.Path<?> path)Shortcut tosortBy(Collection, SortSpecifier...)using a single ascending pathstatic <T> List<T>sortBy(Collection<T> collection, SortSpecifier... sort)Sorts a collection by the given properties.
-
-
-
Method Detail
-
sortBy
public static <T> List<T> sortBy(Collection<T> collection, com.querydsl.core.types.Path<?> path)
Shortcut tosortBy(Collection, SortSpecifier...)using a single ascending path
-
sortBy
@SafeVarargs public static <T> List<T> sortBy(Collection<T> collection, SortSpecifier... sort)
Sorts a collection by the given properties.- Returns:
- ALWAYS the SAME instance if the input collection is already a List (the return is just a convenience to
inline the call).
Otherwise it returns a new List instance, containing the data sorted by the given properties.
If the collection is null it returns null as a result.
-
-