java.lang.Object
com.reallifedeveloper.tools.test.database.inmemory.SortUtil

public final class SortUtil extends Object
A helper class to assist with sorting lists in accordance with org.springframework.data.domain.Sort instances.
Author:
RealLifeDeveloper
  • Method Details

    • sort

      public static <T> List<T> sort(List<T> items, org.springframework.data.domain.Sort sort)
      Sorts the given list according to the sort definition provided.
      Type Parameters:
      T - the type of elements in the list
      Parameters:
      items - the list of items to sort
      sort - the org.springframework.data.domain.Sort instance defining how the list should be sorted
      Returns:
      a copy of items, sorted according to sort