# Class: MultiMap

## vertx-js/multi_map~ MultiMap

#### new MultiMap()

This class represents a MultiMap of String keys to a List of String values.

It's useful in Vert.x to represent things in Vert.x like HTTP headers and HTTP parameters which allow multiple values for keys.

Source:
  - vertx-js/multi_map.js, line 32

### Methods

#### add(name, value) → {MultiMap}

Adds a new value with the specified name and value.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | The name
`value` | string | The value being added

Source:
  - vertx-js/multi_map.js, line 122

##### Returns:

a reference to this, so the API can be used fluently

Type
  MultiMap

#### addAll(map) → {MultiMap}

Adds all the entries from another MultiMap to this one

##### Parameters:

Name | Type | Description
--- | --- | ---
`map` | MultiMap |

Source:
  - vertx-js/multi_map.js, line 137

##### Returns:

a reference to this, so the API can be used fluently

Type
  MultiMap

#### clear() → {MultiMap}

Removes all

Source:
  - vertx-js/multi_map.js, line 200

##### Returns:

a reference to this, so the API can be used fluently

Type
  MultiMap

#### contains(name, value, caseInsensitive) → {boolean}

Check if there is a header with the specified `name` and `value`. If `caseInsensitive` is `true`, `value` is compared in a case-insensitive way.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | the name to search for
`value` | string | the value to search for
`caseInsensitive` | boolean |

Source:
  - vertx-js/multi_map.js, line 77

##### Returns:

`true` if at least one entry is found

Type
  boolean

#### get(name) → {string}

Returns the value of with the specified name. If there are more than one values for the specified name, the first value is returned.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | The name of the header to search

Source:
  - vertx-js/multi_map.js, line 45

##### Returns:

The first header value or `null` if there is no such entry

Type
  string

#### getAll(name) → {Array.<string>}

Returns the values with the specified name

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | The name to search

Source:
  - vertx-js/multi_map.js, line 59

##### Returns:

A immutable List of values which will be empty if no values are found

Type
  Array.<string>

#### isEmpty() → {boolean}

Return true if empty

Source:
  - vertx-js/multi_map.js, line 93

##### Returns:

Type
  boolean

#### names() → {Array.<string>}

Gets a immutable Set of all names

Source:
  - vertx-js/multi_map.js, line 107

##### Returns:

A Set of all names

Type
  Array.<string>

#### remove(name) → {MultiMap}

Removes the value with the given name

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | The name of the value to remove

Source:
  - vertx-js/multi_map.js, line 185

##### Returns:

a reference to this, so the API can be used fluently

Type
  MultiMap

#### set(name, value) → {MultiMap}

Sets a value under the specified name.

If there is an existing header with the same name, it is removed.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | The name
`value` | string | The value

Source:
  - vertx-js/multi_map.js, line 155

##### Returns:

a reference to this, so the API can be used fluently

Type
  MultiMap

#### setAll(map) → {MultiMap}

Cleans this instance.

##### Parameters:

Name | Type | Description
--- | --- | ---
`map` | MultiMap |

Source:
  - vertx-js/multi_map.js, line 170

##### Returns:

a reference to this, so the API can be used fluently

Type
  MultiMap

#### size() → {number}

Return the number of keys.

Source:
  - vertx-js/multi_map.js, line 215

##### Returns:

Type
  number