V
- The generic valuepublic class ConvertibleMultiValuesMap<V> extends java.lang.Object implements ConvertibleMultiValues<V>
ConvertibleMultiValues
that uses a backing LinkedHashMap
.Modifier and Type | Field and Description |
---|---|
static ConvertibleMultiValues |
EMPTY |
protected java.util.Map<java.lang.CharSequence,java.util.List<V>> |
values |
Constructor and Description |
---|
ConvertibleMultiValuesMap()
Construct an empty
ConvertibleValuesMap . |
ConvertibleMultiValuesMap(java.util.Map<java.lang.CharSequence,java.util.List<V>> values)
Construct a
ConvertibleValuesMap from the given map. |
ConvertibleMultiValuesMap(java.util.Map<java.lang.CharSequence,java.util.List<V>> values,
ConversionService<?> conversionService)
Construct a
ConvertibleValuesMap from the given map and conversion service. |
Modifier and Type | Method and Description |
---|---|
V |
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<V> |
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<V>> |
values() |
protected java.util.Map<java.lang.CharSequence,java.util.List<V>> |
wrapValues(java.util.Map<java.lang.CharSequence,java.util.List<V>> values)
Wraps the values (by default in an unmodifiable map).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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 static final ConvertibleMultiValues EMPTY
protected final java.util.Map<java.lang.CharSequence,java.util.List<V>> values
public ConvertibleMultiValuesMap()
ConvertibleValuesMap
.public ConvertibleMultiValuesMap(java.util.Map<java.lang.CharSequence,java.util.List<V>> values)
ConvertibleValuesMap
from the given map.values
- The mappublic ConvertibleMultiValuesMap(java.util.Map<java.lang.CharSequence,java.util.List<V>> values, ConversionService<?> conversionService)
ConvertibleValuesMap
from the given map and conversion service.values
- The mapconversionService
- The conversion servicepublic <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.List<V> getAll(java.lang.CharSequence name)
ConvertibleMultiValues
getAll
in interface ConvertibleMultiValues<V>
name
- The header namepublic V get(java.lang.CharSequence name)
ConvertibleMultiValues
get
in interface ConvertibleMultiValues<V>
name
- The name of the valueConvertibleMultiValues.getFirst(CharSequence)
public java.util.Set<java.lang.String> names()
names
in interface ConvertibleValues<java.util.List<V>>
public java.util.Collection<java.util.List<V>> values()
values
in interface ConvertibleValues<java.util.List<V>>