code: private static Double priority(final String text) {
          final String[] parts = MediaType.split(text);
          final Double priority;
          if (parts.length > 1) {
              final String num =
                  MediaType.NON_DIGITS.matcher(parts[1]).replaceAll("");
              if (num.isEmpty()) {
                  priority = 0.0d;
              } else {
                  priority = Double.parseDouble(num);
              }
          } else {
              priority = 1.0d;
          }
          return priority;
      }
docs: Returns the media type priority.
  @param text The media type text.
  @return The priority of the media type.