code: public static void sortByQualityValue(List<MediaType> mediaTypes) {
          checkNotNull(mediaTypes, "'mediaTypes' must not be null");
          if (mediaTypes.size() > 1) {
              Collections.sort(mediaTypes, QUALITY_VALUE_COMPARATOR);
          }
      }
docs: Sorts the given list of {@code MediaType} objects by quality value.
  <p>Given two media types:
  <ol>
  <li>if the two media types have different {@linkplain #getQualityValue() quality value}, then the media type
  with the highest quality value is ordered before the other.</li>
  <li>if either media type has a {@linkplain #isWildcardType() wildcard type}, then the media type without the
  wildcard is ordered before the other.</li>
  <li>if the two media types have different {@linkplain #getType() types}, then they are considered equal and
  remain their current order.</li>
  <li>if either media type has a {@linkplain #isWildcardSubtype() wildcard subtype}, then the media type without
  the wildcard is sorted before the other.</li>
  <li>if the two media types have different {@linkplain #getSubtype() subtypes}, then they are considered equal
  and remain their current order.</li>
  <li>if the two media types have a different amount of {@linkplain #getParameter(String) parameters}, then the
  media type with the most parameters is ordered before the other.</li>
  </ol>
  
  @param mediaTypes the list of media types to be sorted
  @see #getQualityValue()