public class SimpleCookies extends java.lang.Object implements Cookies
Cookies
implementation.EMPTY
Constructor and Description |
---|
SimpleCookies(ConversionService conversionService) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<Cookie> |
findCookie(java.lang.CharSequence name)
Find a
Cookie for the given name. |
<T> java.util.Optional<T> |
get(java.lang.CharSequence name,
ArgumentConversionContext<T> conversionContext)
Resolve the given property for the given name.
|
<T> java.util.Optional<T> |
get(java.lang.CharSequence name,
java.lang.Class<T> requiredType)
Resolve the given property for the given name.
|
java.util.Set<Cookie> |
getAll() |
Cookie |
put(java.lang.CharSequence name,
Cookie cookie)
Put a new cookie.
|
void |
putAll(java.util.Map<java.lang.CharSequence,Cookie> cookies)
Put a set of new cookies.
|
java.util.Collection<Cookie> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asMap, asMap, asProperties, contains, empty, forEach, getValue, getValueType, isEmpty, iterator, of, subMap, subMap, subMap
get, get
public SimpleCookies(ConversionService conversionService)
conversionService
- The conversion servicepublic java.util.Set<Cookie> getAll()
public java.util.Optional<Cookie> findCookie(java.lang.CharSequence name)
Cookies
Cookie
for the given name.findCookie
in interface Cookies
name
- The cookieOptional
cookiepublic <T> java.util.Optional<T> get(java.lang.CharSequence name, java.lang.Class<T> requiredType)
ValueResolver
get
in interface ValueResolver<java.lang.CharSequence>
T
- The concrete typename
- The namerequiredType
- The required typepublic <T> java.util.Optional<T> get(java.lang.CharSequence name, ArgumentConversionContext<T> conversionContext)
ValueResolver
get
in interface ValueResolver<java.lang.CharSequence>
T
- The concrete typename
- The nameconversionContext
- The conversion contextpublic java.util.Collection<Cookie> values()
values
in interface ConvertibleValues<Cookie>
public Cookie put(java.lang.CharSequence name, Cookie cookie)
name
- the name of the cookiecookie
- the cookie itselfpublic void putAll(java.util.Map<java.lang.CharSequence,Cookie> cookies)
cookies
- Map of cookie names and cookies