ReadonlyKeyedMultiCollection<K, V> Interface

    Package: @esfx/collection-core

    A ReadonlyKeyedMultiCollection<K, V> describes a keyed collection object that can contain other values, has a known size, and whose elements can be accessed by key, where each key can represent one or more elements.

    Declaration
    export interface ReadonlyKeyedMultiCollection<K, V> extends Iterable<[K, V]> 
    Inheritance
    Iterable<[K, V]>
    ReadonlyKeyedMultiCollection<K, V>

    Properties

    [ReadonlyKeyedMultiCollection.size]

    Gets the number of elements in the collection.

    Declaration
    readonly [ReadonlyKeyedMultiCollection.size]: number;
    Property Value
    number

    Methods

    [ReadonlyKeyedMultiCollection.get](key)

    Gets the value in the collection associated with the provided key, if it exists.

    Declaration
    [ReadonlyKeyedMultiCollection.get](key: K): Iterable<V> | undefined;
    Parameters
    key
    K

    Returns
    Iterable<V> | undefined

    [ReadonlyKeyedMultiCollection.has](key)

    Tests whether a key is present in the collection.

    Declaration
    [ReadonlyKeyedMultiCollection.has](key: K): boolean;
    Parameters
    key
    K

    Returns
    boolean

    [ReadonlyKeyedMultiCollection.hasValue](key, value)

    Tests whether a key and value is present in the collection.

    Declaration
    [ReadonlyKeyedMultiCollection.hasValue](key: K, value: V): boolean;
    Parameters
    key
    K

    value
    V

    Returns
    boolean

    [ReadonlyKeyedMultiCollection.keys]()

    Gets an IterableIterator for the keys present in the collection.

    Declaration
    [ReadonlyKeyedMultiCollection.keys](): IterableIterator<K>;
    Returns
    IterableIterator<K>

    [ReadonlyKeyedMultiCollection.values]()

    Gets an IterableIterator for the values present in the collection.

    Declaration
    [ReadonlyKeyedMultiCollection.values](): IterableIterator<V>;
    Returns
    IterableIterator<V>

    • Improve this Doc
    Generated by DocFX