Package io.micronaut.core.convert.value
Class ConvertibleMultiValuesMap<V>
java.lang.Object
io.micronaut.core.convert.value.ConvertibleMultiValuesMap<V>
- Type Parameters:
- V- The generic value
- All Implemented Interfaces:
- ConversionServiceAware,- ConversionServiceProvider,- ConvertibleMultiValues<V>,- ConvertibleValues<List<V>>,- ValueResolver<CharSequence>,- Iterable<Map.Entry<String,- List<V>>> 
- Direct Known Subclasses:
- MutableConvertibleMultiValuesMap
public class ConvertibleMultiValuesMap<V>
extends Object
implements ConvertibleMultiValues<V>, ConversionServiceAware
An implementation of 
ConvertibleMultiValues that uses a backing LinkedHashMap.- Since:
- 1.0
- Author:
- Graeme Rocher
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final ConvertibleMultiValuesprotected final Map<CharSequence,List<V>> 
- 
Constructor SummaryConstructorsConstructorDescriptionConstruct an emptyConvertibleValuesMap.ConvertibleMultiValuesMap(Map<CharSequence, List<V>> values) Construct aConvertibleValuesMapfrom the given map.ConvertibleMultiValuesMap(Map<CharSequence, List<V>> values, ConversionService conversionService) Construct aConvertibleValuesMapfrom the given map and conversion service.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanget(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.getAll(CharSequence name) Get all the values for the given name without applying conversion.Provides the conversion service.inthashCode()names()voidsetConversionService(ConversionService conversionService) Sets the conversion service.Collection<List<V>>values()protected Map<CharSequence,List<V>> wrapValues(Map<CharSequence, List<V>> values) Wraps the values (by default in an unmodifiable map).Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.convert.value.ConvertibleMultiValuesforEach, forEachValue, getFirst, getFirst, getFirst, getFirst, getFirst, isEmpty, iteratorMethods inherited from interface io.micronaut.core.convert.value.ConvertibleValuesasMap, asMap, asProperties, contains, getValue, getValueType, subMap, subMap, subMapMethods inherited from interface java.lang.IterableforEach, spliteratorMethods inherited from interface io.micronaut.core.value.ValueResolverget, get, get
- 
Field Details- 
EMPTY
- 
values
 
- 
- 
Constructor Details- 
ConvertibleMultiValuesMappublic ConvertibleMultiValuesMap()Construct an emptyConvertibleValuesMap.
- 
ConvertibleMultiValuesMapConstruct aConvertibleValuesMapfrom the given map.- Parameters:
- values- The map
 
- 
ConvertibleMultiValuesMappublic ConvertibleMultiValuesMap(Map<CharSequence, List<V>> values, ConversionService conversionService) Construct aConvertibleValuesMapfrom the given map and conversion service.- Parameters:
- values- The map
- conversionService- The conversion service
 
 
- 
- 
Method Details- 
getDescription copied from interface:ValueResolverResolve the given property for the given name.- Specified by:
- getin interface- ValueResolver<V>
- Type Parameters:
- T- The concrete type
- Parameters:
- name- The name
- conversionContext- The conversion context
- Returns:
- An optional containing the property value if it exists and is able to be converted
 
- 
getAllDescription copied from interface:ConvertibleMultiValuesGet all the values for the given name without applying conversion.- Specified by:
- getAllin interface- ConvertibleMultiValues<V>
- Parameters:
- name- The header name
- Returns:
- All the values
 
- 
getDescription copied from interface:ConvertibleMultiValuesGet a value without applying any conversion.- Specified by:
- getin interface- ConvertibleMultiValues<V>
- Parameters:
- name- The name of the value
- Returns:
- The raw value or null
- See Also:
 
- 
names- Specified by:
- namesin interface- ConvertibleValues<V>
- Returns:
- The names of the values
 
- 
values- Specified by:
- valuesin interface- ConvertibleValues<V>
- Returns:
- The values
 
- 
wrapValuesWraps the values (by default in an unmodifiable map).- Parameters:
- values- The values
- Returns:
- The wrapped values.
 
- 
equals
- 
hashCodepublic int hashCode()
- 
getConversionServiceDescription copied from interface:ConversionServiceProviderProvides the conversion service.- Specified by:
- getConversionServicein interface- ConversionServiceProvider
- Specified by:
- getConversionServicein interface- ConvertibleValues<V>
- Returns:
- the conversion service
 
- 
setConversionServiceDescription copied from interface:ConversionServiceAwareSets the conversion service.- Specified by:
- setConversionServicein interface- ConversionServiceAware
- Parameters:
- conversionService- The conversion service
 
 
-