private boolean matches(HTTPMethod requestMethod, List<String> requestPath) {
      return method == requestMethod &&
          requiredLength == requestPath.size() &&
          requirements.entrySet().stream()
              .allMatch(
                  requirement ->
                      requirement
                          .getValue()
                          .equalsIgnoreCase(requestPath.get(requirement.getKey())));
    }
An exception safe way of getting a route by name.

@param name the route name
@return the route instance or null if it could not be found
standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogAdapter.java