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, valuesFields inherited from interface io.micronaut.core.convert.value.ConvertibleValues
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionDefault 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, valuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.convert.value.ConvertibleMultiValues
forEach, forEachValue, get, getAll, getFirst, getFirst, getFirst, getFirst, getFirst, isEmpty, iteratorMethods inherited from interface io.micronaut.core.convert.value.ConvertibleValues
asMap, asMap, asProperties, contains, getConversionService, getValue, getValueType, names, subMap, subMap, subMap, valuesMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface io.micronaut.core.convert.value.MutableConvertibleValues
putAll, putAllMethods 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:MutableConvertibleMultiValuesAdds a value for the given key. Note that this method will not remove items currently associated with the key.- Specified by:
addin interfaceMutableConvertibleMultiValues<V>- Parameters:
key- The keyvalue- The value- Returns:
- This instance
-
put
Description copied from interface:MutableConvertibleValuesInsert a value for the given key and value.- Specified by:
putin interfaceMutableConvertibleValues<V>- Parameters:
key- The keyvalue- The value- Returns:
- This values instance
-
remove
Description copied from interface:MutableConvertibleValuesRemove a value for the given key.- Specified by:
removein interfaceMutableConvertibleValues<V>- Parameters:
key- The key- Returns:
- This values instance
-
remove
Description copied from interface:MutableConvertibleMultiValuesRemove the given value from the given key.- Specified by:
removein interfaceMutableConvertibleMultiValues<V>- Parameters:
key- The keyvalue- The value- Returns:
- This instance
-
clear
Description copied from interface:MutableConvertibleMultiValuesClear all values.- Specified by:
clearin interfaceMutableConvertibleMultiValues<V>- Specified by:
clearin interfaceMutableConvertibleValues<V>- Returns:
- This instance
-
wrapValues
Description copied from class:ConvertibleMultiValuesMapWraps the values (by default in an unmodifiable map).- Overrides:
wrapValuesin classConvertibleMultiValuesMap<V>- Parameters:
values- The values- Returns:
- The wrapped values.
-