code: private static boolean hasMatch(String[] typeParams, String... type) {
      boolean matches = false;
      for(String t : type) {
        for(String typeParam : typeParams) {
          if(typeParam.contains("/")) {
            String typePart = typeParam.replace("*", "");
            if(t.startsWith(typePart) || t.endsWith(typePart)) {
              matches = true;
              break;
            }
          } else if(t.equals(typeParam)) {
            matches = true;
            break;
          }
        }
        if(matches) {
          break;
        }
      }
      return matches;
    }
docs: Check to see if a Accept header accept part matches any of the given types.
  @param typeParams
  @param type
  @return