public interface HttpMethods extends Streamable<HttpMethod>
HttpMethod
s with some convenience methods to create alternate sets of those.Modifier and Type | Method and Description |
---|---|
default HttpMethods |
and(HttpMethod... method)
Returns a new
HttpMethods with the given HttpMethod s added. |
default HttpMethods |
butWithout(HttpMethod... method)
Returns a new
HttpMethods instance with the given HttpMethod s removed. |
boolean |
contains(HttpMethod method)
Returns whether the given
HttpMethod is contained in the current HttpMethods . |
static HttpMethods |
none() |
static HttpMethods |
of(Collection<HttpMethod> methods)
Returns a new
HttpMethods with the given HttpMethod s. |
default Set<HttpMethod> |
toSet()
Returns an unmodifiable
Set of all underlying HttpMethod s. |
and, and, and, empty, filter, flatMap, get, isEmpty, map, of, of, of, stream, toList, toStreamable, toStreamable
forEach, iterator, spliterator
static HttpMethods none()
static HttpMethods of(Collection<HttpMethod> methods)
HttpMethods
with the given HttpMethod
s.methods
- must not be null.boolean contains(HttpMethod method)
HttpMethod
is contained in the current HttpMethods
.method
- must not be null.default Set<HttpMethod> toSet()
Set
of all underlying HttpMethod
s.toSet
in interface Streamable<HttpMethod>
default HttpMethods and(HttpMethod... method)
HttpMethods
with the given HttpMethod
s added.and
in interface Streamable<HttpMethod>
method
- must not be null.default HttpMethods butWithout(HttpMethod... method)
HttpMethods
instance with the given HttpMethod
s removed.method
- must not be null.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.