private boolean removeRoute(HttpMethod httpMethod, String path) {
        List<RouteEntry> forRemoval = new ArrayList<>();

        for (RouteEntry routeEntry : routes) {
            HttpMethod httpMethodToMatch = httpMethod;

            if (httpMethod == null) {
                // Use the routeEntry's HTTP method if none was given, so that only path is used to match.
                httpMethodToMatch = routeEntry.httpMethod;
            }

            if (routeEntry.matches(httpMethodToMatch, path)) {
                LOG.debug("Removing path {}", path, httpMethod == null ? "" : " with HTTP method " + httpMethod);

                forRemoval.add(routeEntry);
            }
        }

        return routes.removeAll(forRemoval);
    }
Removes a particular route from the collection of those that have been previously routed.
Search for a previously established routes using the given path and removes any matches that are found.

@param path the route path
@return <tt>true</tt> if this a matching route has been previously routed
@throws java.lang.IllegalArgumentException if <tt>path</tt> is null or blank
@since 2.2
src/main/java/spark/route/Routes.java