public class SimpleHttpParameters extends java.lang.Object implements MutableHttpParameters
MutableHttpParameters
.EMPTY
Constructor and Description |
---|
SimpleHttpParameters(ConversionService conversionService) |
SimpleHttpParameters(java.util.Map<java.lang.CharSequence,java.util.List<java.lang.String>> values,
ConversionService conversionService) |
Modifier and Type | Method and Description |
---|---|
MutableHttpParameters |
add(java.lang.CharSequence name,
java.util.List<java.lang.CharSequence> values)
Adds a new http parameter.
|
java.lang.String |
get(java.lang.CharSequence name)
Get a value without applying any conversion.
|
<T> java.util.Optional<T> |
get(java.lang.CharSequence name,
ArgumentConversionContext<T> conversionContext)
Resolve the given property for the given name.
|
java.util.List<java.lang.String> |
getAll(java.lang.CharSequence name)
Get all the values for the given name without applying conversion.
|
java.util.Set<java.lang.String> |
names() |
java.util.Collection<java.util.List<java.lang.String>> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add
empty, forEach, forEachValue, getFirst, getFirst, getFirst, getFirst, getFirst, isEmpty, iterator, of
asMap, asMap, asProperties, contains, getValue, getValueType, of, subMap, subMap, subMap
get, get, get
public SimpleHttpParameters(java.util.Map<java.lang.CharSequence,java.util.List<java.lang.String>> values, ConversionService conversionService)
values
- The parameter valuesconversionService
- The conversion servicepublic SimpleHttpParameters(ConversionService conversionService)
conversionService
- The conversion servicepublic java.util.Set<java.lang.String> names()
names
in interface ConvertibleValues<java.util.List<java.lang.String>>
public java.util.Collection<java.util.List<java.lang.String>> values()
values
in interface ConvertibleValues<java.util.List<java.lang.String>>
public java.util.List<java.lang.String> getAll(java.lang.CharSequence name)
ConvertibleMultiValues
getAll
in interface ConvertibleMultiValues<java.lang.String>
name
- The header namepublic java.lang.String get(java.lang.CharSequence name)
ConvertibleMultiValues
get
in interface ConvertibleMultiValues<java.lang.String>
name
- The name of the valueConvertibleMultiValues.getFirst(CharSequence)
public <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 MutableHttpParameters add(java.lang.CharSequence name, java.util.List<java.lang.CharSequence> values)
MutableHttpParameters
add
in interface MutableHttpParameters
name
- the name of the parametervalues
- the values of the parameter