# 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 116

##### 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 131

##### 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 194

##### Returns:

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

Type
  MultiMap

#### contains(name) → {boolean}

Checks to see if there is a value with the specified name

##### Parameters:

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

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

##### 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 87

##### Returns:

Type
  boolean

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

Gets a immutable Set of all names

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

##### 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 179

##### 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 149

##### 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 164

##### 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 209

##### Returns:

Type
  number