Interface HttpMethods
- All Superinterfaces:
Iterable<HttpMethod>
,Streamable<HttpMethod>
,Supplier<Stream<HttpMethod>>
- All Known Implementing Classes:
ConfigurableHttpMethods
A collection of
HttpMethod
s with some convenience methods to create alternate sets of those.- Author:
- Oliver Gierke
-
Method Summary
Modifier and TypeMethodDescriptiondefault HttpMethods
and
(HttpMethod... method) Returns a newHttpMethods
with the givenHttpMethod
s added.default HttpMethods
butWithout
(HttpMethod... method) Returns a newHttpMethods
instance with the givenHttpMethod
s removed.boolean
contains
(HttpMethod method) Returns whether the givenHttpMethod
is contained in the currentHttpMethods
.static HttpMethods
none()
static HttpMethods
of
(Collection<HttpMethod> methods) Returns a newHttpMethods
with the givenHttpMethod
s.default Set<HttpMethod>
toSet()
Returns an unmodifiableSet
of all underlyingHttpMethod
s.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
none
-
of
Returns a newHttpMethods
with the givenHttpMethod
s.- Parameters:
methods
- must not be null.- Returns:
-
contains
Returns whether the givenHttpMethod
is contained in the currentHttpMethods
.- Parameters:
method
- must not be null.- Returns:
-
toSet
Returns an unmodifiableSet
of all underlyingHttpMethod
s.- Specified by:
toSet
in interfaceStreamable<HttpMethod>
- Returns:
-
and
Returns a newHttpMethods
with the givenHttpMethod
s added.- Specified by:
and
in interfaceStreamable<HttpMethod>
- Parameters:
method
- must not be null.- Returns:
-
butWithout
Returns a newHttpMethods
instance with the givenHttpMethod
s removed.- Parameters:
method
- must not be null.- Returns:
-