Collection - Map (Associative arrays|Dictionary|Hash table)

> (Data|State) Management and Processing > (Data Type|Data Structure) > (Collection|Container) Data Type (Array, List, Set, ...)

1 - About

A map is an object that maps keys to values (known as property)

Also known as:

  • associative memories” or “associative arrays”
  • dictionary
  • hash table

A map cannot contain duplicate keys; each key can map to at most one value.

A map holds a set of key/ value pairs and provides constant-time operations to store, retrieve, or test for an item in the set.

In javascript, an object can be seen as a map of properties.

Advertising

3 - Implementation

  • hashmap.
  • LinkedHashMap
  • TreeMap