code: public static <T extends Enum<T> & FieldNameProvider> List<Order> parse(final Class<T> enumType,
              final String sortString) throws SortParameterSyntaxErrorException {
          final List<Order> parsedSortings = new ArrayList<>();
          // scan the sort tuples e.g. field:direction
          if (sortString != null) {
              final StringTokenizer tupleTokenizer = new StringTokenizer(sortString, DELIMITER_SORT_TUPLE);
              while (tupleTokenizer.hasMoreTokens()) {
                  final String sortTuple = tupleTokenizer.nextToken().trim();
                  final StringTokenizer fieldDirectionTokenizer = new StringTokenizer(sortTuple,
                          DELIMITER_FIELD_DIRECTION);
                  if (fieldDirectionTokenizer.countTokens() == 2) {
                      final String fieldName = fieldDirectionTokenizer.nextToken().trim().toUpperCase();
                      final String sortDirectionStr = fieldDirectionTokenizer.nextToken().trim();
  
                      final T identifier = getAttributeIdentifierByName(enumType, fieldName);
  
                      final Direction sortDirection = getDirection(sortDirectionStr);
                      parsedSortings.add(new Order(sortDirection, identifier.getFieldName()));
                  } else {
                      throw new SortParameterSyntaxErrorException();
                  }
              }
          }
          return parsedSortings;
      }
docs: Parses the sort string e.g. given in a REST call based on the definition
  of sorting: http://localhost/entity?s=field1:ASC, field2:DESC The fields
  will be split into the keys of the returned map. The direction of the
  sorting will be mapped into the {@link Direction} enum.
  
  @param enumType
  the class of the enum which the fields in the sort string
  should be related to.
  @param <T>
  the type of the enumeration which must be derived from
  {@link FieldNameProvider}
  @param sortString
  the string representation of the query parameters. Might be
  {@code null} or an empty string.
  @return a list which holds the {@link FieldNameProvider} and the specific
  {@link Direction} for them as a tuple. Never {@code null}. In
  case of no sorting parameters an empty map will be returned.
  @throws SortParameterSyntaxErrorException
  if the sorting query parameter is not well-formed
  @throws SortParameterUnsupportedFieldException
  if a field name cannot be mapped to the enum type
  @throws SortParameterUnsupportedDirectionException
  if the given direction is not "ASC" or "DESC"