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