private static class RequestPredicates.HttpMethodPredicate extends java.lang.Object implements RequestPredicate
Modifier and Type | Field and Description |
---|---|
private java.util.Set<HttpMethod> |
httpMethods |
Constructor and Description |
---|
HttpMethodPredicate(HttpMethod... httpMethods) |
HttpMethodPredicate(HttpMethod httpMethod) |
Modifier and Type | Method and Description |
---|---|
void |
accept(RequestPredicates.Visitor visitor)
Accept the given visitor.
|
boolean |
test(ServerRequest request)
Evaluate this predicate on the given request.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
and, negate, nest, or
private final java.util.Set<HttpMethod> httpMethods
public HttpMethodPredicate(HttpMethod httpMethod)
public HttpMethodPredicate(HttpMethod... httpMethods)
public boolean test(ServerRequest request)
RequestPredicate
test
in interface RequestPredicate
request
- the request to match againsttrue
if the request matches the predicate; false
otherwisepublic void accept(RequestPredicates.Visitor visitor)
RequestPredicate
RequestPredicates.Visitor.unknown(RequestPredicate)
; composed RequestPredicate
implementations are expected to call accept
for all components that make up this
request predicate.accept
in interface RequestPredicate
visitor
- the visitor to acceptpublic java.lang.String toString()
toString
in class java.lang.Object