@zeroc/ice
    Preparing search index...

    Class HashMap<Key, Value>

    Type Parameters

    Index

    Constructors

    Properties

    size: number

    The number of entries in the HashMap.

    Methods

    • Returns an iterator over the key-value pairs in the HashMap.

      Returns IterableIterator<[Key, Value]>

      An iterator of [key, value] pairs.

    • Removes all entries from the HashMap.

      Returns void

    • Deletes the entry associated with the specified key.

      Parameters

      • key: Key

        The key of the entry to delete.

      Returns Value

      The value associated with the deleted key, or undefined if the key did not exist.

    • Returns an iterable of key-value pairs in the HashMap.

      Returns IterableIterator<[Key, Value]>

      An iterable iterator of [key, value] pairs.

    • Executes a provided function once for each key-value pair in the HashMap.

      Parameters

      • fn: (value: Value, key: Key) => void

        The function to execute for each entry.

      • OptionalthisArg: object

        Optional. Value to use as this when executing fn.

      Returns void

    • Retrieves the value associated with the specified key.

      Parameters

      • key: Key

        The key of the entry to retrieve.

      Returns Value

      The value associated with the key, or undefined if the key does not exist.

    • Checks if the specified key exists in the HashMap.

      Parameters

      • key: Key

        The key to check for existence.

      Returns boolean

      True if the key exists, false otherwise.

    • Returns an iterable of keys in the HashMap.

      Returns IterableIterator<Key>

      An iterable iterator of keys.

    • Adds a new entry with a specified key and value to this HashMap, or updates an existing entry if the key already exists.

      Parameters

      • key: Key

        The key of the entry.

      • value: Value

        The value of the entry.

      Returns void

    • Returns an iterable of values in the HashMap.

      Returns IterableIterator<Value>

      An iterable iterator of values.