Documentation
¶
Overview ¶
Package maps provides an abstract Map interface.
In computer science, an associative array, map, symbol table, or dictionary is an abstract data type composed of a collection of (key, value) pairs, such that each possible key appears just once in the collection.
Operations associated with this data type allow: - the addition of a pair to the collection - the removal of a pair from the collection - the modification of an existing pair - the lookup of a value associated with a particular key
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BidiMap ¶
type BidiMap[TKey, TValue any] interface { GetKey(value TValue) (key TKey, found bool) Map[TKey, TValue] }
BidiMap interface that all bidirectional maps implement (extends the Map interface).
type Map ¶
type Map[TKey, TValue any] interface { Put(key TKey, value TValue) Get(key TKey) (value TValue, found bool) Remove(comparator utils.Comparator[TKey], key TKey) GetKeys() []TKey MergeWith(other *Map[TKey, TValue]) bool MergeWithSafe(other *Map[TKey, TValue], overwriteOriginal bool) ds.Container[TValue] }
Map interface that all maps implement.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package hashbidimap implements a bidirectional map backed by two hashmaps.
|
Package hashbidimap implements a bidirectional map backed by two hashmaps. |
|
Package hashmap implements a map backed by a hash table.
|
Package hashmap implements a map backed by a hash table. |
|
Package linkedhashmap is a map that preserves insertion-order.
|
Package linkedhashmap is a map that preserves insertion-order. |
|
Package treebidimap implements a bidirectional map backed by two red-black tree.
|
Package treebidimap implements a bidirectional map backed by two red-black tree. |
|
Package treemap implements a map backed by red-black tree.
|
Package treemap implements a map backed by red-black tree. |
Click to show internal directories.
Click to hide internal directories.