Skip to content

CustomArrayDictImpl<T>

Unofficial

A dictionary that maps string keys to arrays of unique values, implementing CustomArrayDict.

Import:

import { CustomArrayDictImpl } from '@obsidian-typings/obsidian-public-latest/implementations';

Signature:

export class CustomArrayDictImpl<T> implements CustomArrayDict<T>

Implements: CustomArrayDict<T>

Properties

Property Type Description
data Map<string, T[]> Internal map storing key-to-array mappings.

Methods

Method Returns Description
add(key, value) void Add a value to the array associated with the given key.
clear(key) void Remove all values for the given key.
clearAll() void Remove all keys and their values.
contains(key, value) boolean Check whether the array for the given key contains the specified value.
count() number Get the total number of values across all keys.
get(key) null | T[] Get the array of values for the given key, or null if not found.
keys() string[] Get all keys in the dictionary.
remove(key, value) void Remove a specific value from the array associated with the given key.