code: public static <T extends Extendable> List<T> sortAndGroup(final List<T> values, final Group[] groups, final Sort sort, final boolean ascending) {
          List<T> list = sort(values, sort, ascending);
          list = group(list, groups);
          return list;
      }
docs: Sorts and groups a set of entries.
  
  @param values List of Extendable implementations.
  @param groups Group items to group by.
  @param sort Field to sort on.
  @param ascending Sort ascending/descending
  @return Grouped and sorted list of entries.