code: public static void sortBySpecificity(List<MimeType> mimeTypes) {
          checkNotNull(mimeTypes, "'mimeTypes' must not be null");
          if (mimeTypes.size() > 1) {
              Collections.sort(mimeTypes, SPECIFICITY_COMPARATOR);
          }
      }
docs: Sorts the given list of {@code MimeType} objects by specificity.
  <p>Given two mime types:
  <ol>
  <li>if either mime type has a {@linkplain MimeType#isWildcardType() wildcard type},
  then the mime type without the wildcard is ordered before the other.</li>
  <li>if the two mime types have different {@linkplain MimeType#getType() types},
  then they are considered equal and remain their current order.</li>
  <li>if either mime type has a {@linkplain MimeType#isWildcardSubtype() wildcard subtype}
  , then the mime type without the wildcard is sorted before the other.</li>
  <li>if the two mime types have different {@linkplain MimeType#getSubtype() subtypes},
  then they are considered equal and remain their current order.</li>
  <li>if the two mime types have a different amount of
  {@linkplain MimeType#getParameter(String) parameters}, then the mime type with the most
  parameters is ordered before the other.</li>
  </ol>
  <p>For example: <blockquote>audio/basic &lt; audio/* &lt; *&#047;*</blockquote>
  <blockquote>audio/basic;level=1 &lt; audio/basic</blockquote>
  <blockquote>audio/basic == text/html</blockquote> <blockquote>audio/basic ==
  audio/wave</blockquote>
  @param mimeTypes the list of mime types to be sorted
  @see <a href="http://tools.ietf.org/html/rfc7231#section-5.3.2">HTTP 1.1: Semantics
  and Content, section 5.3.2</a>