insert Method
Attempts to insert a new entry into the dictionary. If an entry with an equivalent key exists, the dictionary is unmodified. If the new entry is in fact inserted, both the key and value will be cloned using the functions supplied to the dictionary's constructor.
insert(key: K, value: V): boolean
@returns true if the new entry was inserted, false if an entry with an equivalent key already exists.
Parameter | Type | Description |
---|---|---|
key | K | The key to associate with the value |
value | V | The value to associate with the key |
Returns - boolean
true if the new entry was inserted, false if an entry with an equivalent key already exists.
Defined in
- core/bentley/src/Dictionary.ts Line 162
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.