V
- The generic valuepublic class ConvertibleMultiValuesMap<V> extends Object implements ConvertibleMultiValues<V>
ConvertibleMultiValues
that uses a backing LinkedHashMap
.Modifier and Type | Field and Description |
---|---|
static ConvertibleMultiValues |
EMPTY |
protected Map<CharSequence,List<V>> |
values |
Constructor and Description |
---|
ConvertibleMultiValuesMap()
Construct an empty
ConvertibleValuesMap . |
ConvertibleMultiValuesMap(Map<CharSequence,List<V>> values)
Construct a
ConvertibleValuesMap from the given map. |
ConvertibleMultiValuesMap(Map<CharSequence,List<V>> values,
ConversionService<?> conversionService)
Construct a
ConvertibleValuesMap from the given map and conversion service. |
Modifier and Type | Method and Description |
---|---|
V |
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<V> |
getAll(CharSequence name)
Get all the values for the given name without applying conversion.
|
Set<String> |
names() |
Collection<List<V>> |
values() |
protected Map<CharSequence,List<V>> |
wrapValues(Map<CharSequence,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
forEach, spliterator
public static final ConvertibleMultiValues EMPTY
protected final Map<CharSequence,List<V>> values
public ConvertibleMultiValuesMap()
ConvertibleValuesMap
.public ConvertibleMultiValuesMap(Map<CharSequence,List<V>> values)
ConvertibleValuesMap
from the given map.values
- The mappublic ConvertibleMultiValuesMap(Map<CharSequence,List<V>> values, ConversionService<?> conversionService)
ConvertibleValuesMap
from the given map and conversion service.values
- The mapconversionService
- The conversion servicepublic <T> Optional<T> get(CharSequence name, ArgumentConversionContext<T> conversionContext)
ValueResolver
get
in interface ValueResolver<CharSequence>
T
- The concrete typename
- The nameconversionContext
- The conversion contextpublic List<V> getAll(CharSequence name)
ConvertibleMultiValues
getAll
in interface ConvertibleMultiValues<V>
name
- The header namepublic V get(CharSequence name)
ConvertibleMultiValues
get
in interface ConvertibleMultiValues<V>
name
- The name of the valueConvertibleMultiValues.getFirst(CharSequence)
public Set<String> names()
names
in interface ConvertibleValues<List<V>>
public Collection<List<V>> values()
values
in interface ConvertibleValues<List<V>>
protected Map<CharSequence,List<V>> wrapValues(Map<CharSequence,List<V>> values)
values
- The values