code: private static boolean compareParts(RoutePart<?> routePart, String pathPart) {
          switch (routePart.getType()) {
              case PATH:
                  return routePart.getValue().equals(pathPart);
              case PARAM:
                  return routePart.getVariableType().isAssignableFromString(pathPart);
              default:
                  return false;
          }
      }
docs: Compares the route part (part which is configured) and the path part (part which is gained from the client).
  
  If it is just string path, so this method will compare the value of the strings.
  <p>
  If it is param path, so method will find out whether is possible to cast the object or not.
  
  @param routePart configured part
  @param pathPart path from a client's call
  @return returns true if the parts are equal
  @throws RestException is not possible to cast the param type