V
- generic valuepublic class ConvertibleValuesMap<V> extends Object implements ConvertibleValues<V>
ConvertibleValues
backed by a map.Modifier and Type | Field and Description |
---|---|
protected Map<? extends CharSequence,V> |
map |
EMPTY
Constructor and Description |
---|
ConvertibleValuesMap()
Constructor.
|
ConvertibleValuesMap(Map<? extends CharSequence,V> map)
Constructor.
|
ConvertibleValuesMap(Map<? extends CharSequence,V> map,
ConversionService<?> conversionService)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String name)
Whether the given key is contained within these values.
|
static <V> ConvertibleValues<V> |
empty()
An empty
ConvertibleValuesMap . |
<T> Optional<T> |
get(CharSequence name,
ArgumentConversionContext<T> conversionContext)
Resolve the given property for the given name.
|
V |
getValue(CharSequence name)
Get a raw value without any conversion.
|
Set<String> |
names() |
Collection<V> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asMap, asMap, asProperties, forEach, getValueType, isEmpty, iterator, of, subMap, subMap, subMap
get, get, get
forEach, spliterator
protected final Map<? extends CharSequence,V> map
public ConvertibleValuesMap()
public ConvertibleValuesMap(Map<? extends CharSequence,V> map)
map
- map of values.public ConvertibleValuesMap(Map<? extends CharSequence,V> map, ConversionService<?> conversionService)
map
- map of values.conversionService
- conversionService@Nullable public V getValue(CharSequence name)
ConvertibleValues
getValue
in interface ConvertibleValues<V>
name
- The key namepublic boolean contains(String name)
ConvertibleValues
contains
in interface ConvertibleValues<V>
name
- The key namepublic <T> Optional<T> get(CharSequence name, ArgumentConversionContext<T> conversionContext)
ValueResolver
get
in interface ValueResolver<CharSequence>
T
- The concrete typename
- The nameconversionContext
- The conversion contextpublic Set<String> names()
names
in interface ConvertibleValues<V>
public Collection<V> values()
values
in interface ConvertibleValues<V>
public static <V> ConvertibleValues<V> empty()
ConvertibleValuesMap
.empty
in interface ConvertibleValues<V>
V
- The generic typeConvertibleValuesMap