V
- generic valuepublic class ConvertibleValuesMap<V> extends java.lang.Object implements ConvertibleValues<V>
ConvertibleValues
backed by a map.Modifier and Type | Field and Description |
---|---|
protected java.util.Map<? extends java.lang.CharSequence,V> |
map |
EMPTY
Constructor and Description |
---|
ConvertibleValuesMap()
Constructor.
|
ConvertibleValuesMap(java.util.Map<? extends java.lang.CharSequence,V> map)
Constructor.
|
ConvertibleValuesMap(java.util.Map<? extends java.lang.CharSequence,V> map,
ConversionService<?> conversionService)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.String name)
Whether the given key is contained within these values.
|
static <V> ConvertibleValues<V> |
empty()
An empty
ConvertibleValuesMap . |
<T> java.util.Optional<T> |
get(java.lang.CharSequence name,
ArgumentConversionContext<T> conversionContext)
Resolve the given property for the given name.
|
V |
getValue(java.lang.CharSequence name)
Get a raw value without any conversion.
|
java.util.Set<java.lang.String> |
names() |
java.util.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
protected final java.util.Map<? extends java.lang.CharSequence,V> map
public ConvertibleValuesMap()
public ConvertibleValuesMap(java.util.Map<? extends java.lang.CharSequence,V> map)
map
- map of values.public ConvertibleValuesMap(java.util.Map<? extends java.lang.CharSequence,V> map, ConversionService<?> conversionService)
map
- map of values.conversionService
- conversionService@Nullable public V getValue(java.lang.CharSequence name)
ConvertibleValues
getValue
in interface ConvertibleValues<V>
name
- The key namepublic boolean contains(java.lang.String name)
ConvertibleValues
contains
in interface ConvertibleValues<V>
name
- The key namepublic <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.Set<java.lang.String> names()
names
in interface ConvertibleValues<V>
public java.util.Collection<V> values()
values
in interface ConvertibleValues<V>
public static <V> ConvertibleValues<V> empty()
ConvertibleValuesMap
.empty
in interface ConvertibleValues<V>
V
- The generic typeConvertibleValuesMap