code: public boolean determine(String paramPath) {
          if (restfulHttpMethod.filter(httpMethod -> {
              final RequestManager requestManager = requestManagerProvider.get();
              return !matchesWithRequestedHttpMethod(requestManager, httpMethod);
          }).isPresent()) {
              return false;
          }
          if (!isParameterEmpty(paramPath)) { // e.g. sea, sea/dockside
              final HandledOptionalPath handled = handleOptionalPathMapping(paramPath);
              if (HandledOptionalPath.CERTAINLY_MATCHES.equals(handled)) { // optional and e.g. count OK and type maybe OK
                  return true;
              } else if (HandledOptionalPath.CERTAINLY_UNMATCHES.equals(handled)) { // optional and e.g. count OK but type difference
                  return false;
              } else { // optional but maybe unmatched or non-optional first
                  return preparedUrlPattern.matcher(paramPath).find();
              }
          } else { // no way
              // should not be called if param is empty, old code is like this:
              //return "index".equals(urlPattern);
              String msg = "The paramPath should not be null or empty: [" + paramPath + "], " + callerExpProvider.get();
              throw new IllegalStateException(msg);
          }
      }
docs: =========