Class SortHelper


  • public final class SortHelper
    extends Object
    Contains methods which should be in CollectionHelper but can't be emulated by GWT
    • Constructor Detail

      • SortHelper

        public SortHelper()
    • Method Detail

      • 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.