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

PropertyTypeDescription
dataMap<string, T[]>Internal map storing key-to-array mappings.

Methods

MethodReturnsDescription
add(key, value)voidAdd a value to the array associated with the given key.
clear(key)voidRemove all values for the given key.
clearAll()voidRemove all keys and their values.
contains(key, value)booleanCheck whether the array for the given key contains the specified value.
count()numberGet 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)voidRemove a specific value from the array associated with the given key.