Package io.micronaut.core.convert.value
Class MutableConvertibleMultiValuesMap<V>
java.lang.Object
io.micronaut.core.convert.value.ConvertibleMultiValuesMap<V>
io.micronaut.core.convert.value.MutableConvertibleMultiValuesMap<V>
- Type Parameters:
V
- The generic value
- All Implemented Interfaces:
ConversionServiceAware
,ConversionServiceProvider
,ConvertibleMultiValues<V>
,ConvertibleValues<List<V>>
,MutableConvertibleMultiValues<V>
,MutableConvertibleValues<List<V>>
,ValueResolver<CharSequence>
,Iterable<Map.Entry<String,
List<V>>>
public class MutableConvertibleMultiValuesMap<V>
extends ConvertibleMultiValuesMap<V>
implements MutableConvertibleMultiValues<V>
Implementation of
MutableConvertibleMultiValues
that operates against a backing LinkedHashMap
.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Fields inherited from class io.micronaut.core.convert.value.ConvertibleMultiValuesMap
EMPTY, values
Fields inherited from interface io.micronaut.core.convert.value.ConvertibleValues
EMPTY
-
Constructor Summary
ConstructorDescriptionDefault constructor.MutableConvertibleMultiValuesMap
(Map<CharSequence, List<V>> values) MutableConvertibleMultiValuesMap
(Map<CharSequence, List<V>> values, ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescriptionadd
(CharSequence key, V value) Adds a value for the given key.clear()
Clear all values.put
(CharSequence key, List<V> value) Insert a value for the given key and value.remove
(CharSequence key) Remove a value for the given key.remove
(CharSequence key, V value) Remove the given value from the given key.protected Map<CharSequence,
List<V>> wrapValues
(Map<CharSequence, List<V>> values) Wraps the values (by default in an unmodifiable map).Methods inherited from class io.micronaut.core.convert.value.ConvertibleMultiValuesMap
equals, get, get, getAll, getConversionService, hashCode, names, setConversionService, values
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.convert.value.ConvertibleMultiValues
forEach, forEachValue, get, getAll, getFirst, getFirst, getFirst, getFirst, getFirst, isEmpty, iterator
Methods inherited from interface io.micronaut.core.convert.value.ConvertibleValues
asMap, asMap, asProperties, contains, getConversionService, getValue, getValueType, names, subMap, subMap, subMap, values
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.micronaut.core.convert.value.MutableConvertibleValues
putAll, putAll
Methods inherited from interface io.micronaut.core.value.ValueResolver
get, get, get, get
-
Constructor Details
-
MutableConvertibleMultiValuesMap
public MutableConvertibleMultiValuesMap()Default constructor. -
MutableConvertibleMultiValuesMap
- Parameters:
values
- The values
-
MutableConvertibleMultiValuesMap
public MutableConvertibleMultiValuesMap(Map<CharSequence, List<V>> values, ConversionService conversionService) - Parameters:
values
- The valuesconversionService
- The conversion service
-
-
Method Details
-
add
Description copied from interface:MutableConvertibleMultiValues
Adds a value for the given key. Note that this method will not remove items currently associated with the key.- Specified by:
add
in interfaceMutableConvertibleMultiValues<V>
- Parameters:
key
- The keyvalue
- The value- Returns:
- This instance
-
put
Description copied from interface:MutableConvertibleValues
Insert a value for the given key and value.- Specified by:
put
in interfaceMutableConvertibleValues<V>
- Parameters:
key
- The keyvalue
- The value- Returns:
- This values instance
-
remove
Description copied from interface:MutableConvertibleValues
Remove a value for the given key.- Specified by:
remove
in interfaceMutableConvertibleValues<V>
- Parameters:
key
- The key- Returns:
- This values instance
-
remove
Description copied from interface:MutableConvertibleMultiValues
Remove the given value from the given key.- Specified by:
remove
in interfaceMutableConvertibleMultiValues<V>
- Parameters:
key
- The keyvalue
- The value- Returns:
- This instance
-
clear
Description copied from interface:MutableConvertibleMultiValues
Clear all values.- Specified by:
clear
in interfaceMutableConvertibleMultiValues<V>
- Specified by:
clear
in interfaceMutableConvertibleValues<V>
- Returns:
- This instance
-
wrapValues
Description copied from class:ConvertibleMultiValuesMap
Wraps the values (by default in an unmodifiable map).- Overrides:
wrapValues
in classConvertibleMultiValuesMap<V>
- Parameters:
values
- The values- Returns:
- The wrapped values.
-