public boolean match(PathInput input) {
        input.rewind();

        if ((httpMethods & input.getHttpMethod()) == 0) {
            return false;
        }

        for (Element element : elements) {
            if (element == null) {
                continue;
            }

            if (!element.match(input)) {
                return false;
            }
        }

        return input.end();
    }