LinkedMultiValueMap

Simple implementation of {@link MultiValueMap} that wraps a {@link LinkedHashMap}, storing multiple values in a {@link LinkedList}.

<p>This Map implementation is generally not thread-safe. It is primarily designed for data structures exposed from request objects, for use in a single thread only.

@author Arjen Poutsma @author Juergen Hoeller

Constructors

this
this()

Create a new LinkedMultiValueMap that wraps a {@link LinkedHashMap}.

this
this(int initialCapacity)

Create a new LinkedMultiValueMap that wraps a {@link LinkedHashMap} with the given initial capacity. @param initialCapacity the initial capacity

this
this(Map!(K, List!(V)) otherMap)

Copy constructor: Create a new LinkedMultiValueMap with the same mappings as the specified Map. Note that this will be a shallow copy; its value-holding List entries will get reused and therefore cannot get modified independently. @param otherMap the Map whose mappings are to be placed in this Map @see #clone() @see #deepCopy()

Members

Functions

add
void add(K key, V value)
Undocumented in source. Be warned that the author may not have intended to support it.
addAll
void addAll(K key, List!(V) values)
Undocumented in source. Be warned that the author may not have intended to support it.
addAll
void addAll(Map!(K, List!V) values)
Undocumented in source. Be warned that the author may not have intended to support it.
byKey
InputRange!K byKey()
Undocumented in source. Be warned that the author may not have intended to support it.
byValue
InputRange!(List!(V)) byValue()
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
containsKey
bool containsKey(K key)
Undocumented in source. Be warned that the author may not have intended to support it.
containsValue
bool containsValue(List!(V) value)
Undocumented in source. Be warned that the author may not have intended to support it.
deepCopy
LinkedMultiValueMap!(K, V) deepCopy()

Create a deep copy of this Map. @return a copy of this Map, including a copy of each value-holding List entry @since 4.2 @see #clone()

get
List!(V) get(K key)
Undocumented in source. Be warned that the author may not have intended to support it.
getFirst
V getFirst(K key)
Undocumented in source. Be warned that the author may not have intended to support it.
isEmpty
bool isEmpty()
Undocumented in source. Be warned that the author may not have intended to support it.
opApply
int opApply(int delegate(ref K, ref List!(V)) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
opApply
int opApply(int delegate(MapEntry!(K, List!(V)) entry) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Object obj)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(IObject o)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
List!(V) opIndex(K key)
Undocumented in source. Be warned that the author may not have intended to support it.
put
List!(V) put(K key, List!(V) value)
Undocumented in source. Be warned that the author may not have intended to support it.
putAll
void putAll(Map!(K, List!(V)) map)
Undocumented in source. Be warned that the author may not have intended to support it.
putIfAbsent
List!(V) putIfAbsent(K key, List!(V) value)
Undocumented in source. Be warned that the author may not have intended to support it.
remove
List!(V) remove(K key)
Undocumented in source. Be warned that the author may not have intended to support it.
remove
bool remove(K key, List!(V) value)
Undocumented in source. Be warned that the author may not have intended to support it.
replace
bool replace(K key, List!(V) oldValue, List!(V) newValue)
Undocumented in source. Be warned that the author may not have intended to support it.
replace
List!(V) replace(K key, List!(V) value)
Undocumented in source. Be warned that the author may not have intended to support it.
set
void set(K key, V value)
Undocumented in source. Be warned that the author may not have intended to support it.
setAll
void setAll(Map!(K, V) values)
Undocumented in source. Be warned that the author may not have intended to support it.
size
int size()
Undocumented in source. Be warned that the author may not have intended to support it.
toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.
toSingleValueMap
Map!(K, V) toSingleValueMap()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
values
List!(V)[] values()
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin CloneMemberTemplate!(typeof(this))

Create a regular copy of this Map. @return a shallow copy of this Map, reusing this Map's value-holding List entries @since 4.2 @see LinkedMultiValueMap#LinkedMultiValueMap(Map) @see #deepCopy()

Meta