Home > @i2analyze/notebook-sdk > data > IKeyedReadOnlyCollection
data.IKeyedReadOnlyCollection interface
A non-modifiable collection of objects, with efficient lookup by key.
Signature:
interface IKeyedReadOnlyCollection<K, V> extends IReadOnlyCollection<V>
Extends: IReadOnlyCollection<V>
Introduced: version 1.0
Type Parameters
Parameter | Type | Description |
---|---|---|
K | any | The type of the keys for the collection. |
V | any | The type of the objects in the collection. |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
size | readonly |
number | Gets the number of objects in the collection. (Inherited from IReadOnlyCollection) |
Methods
Method | Description |
---|---|
[Symbol.iterator]() | Returns an object that can be used to iterate over all objects in the collection. (Inherited from IReadOnlyCollection) |
entries() | Retrieves an iterator over all the objects in the collection. |
every(predicate) | Tests whether all objects in the collection satisfy a predicate. (Inherited from IReadOnlyCollection) |
filter(predicate) | Returns a new collection with all objects that satisfy a typeguard. (Inherited from IReadOnlyCollection) |
filter(predicate) | Returns a new collection with all objects that satisfy a predicate. (Inherited from IReadOnlyCollection) |
find(predicate) | Returns the first object in the collection that satisfies a predicate. (Inherited from IReadOnlyCollection) |
firstOrDefault(defaultValue) | Returns the first object in the collection, or a default object if the collection is empty. (Inherited from IReadOnlyCollection) |
get(key) | Retrieves the object associated with the specified key. |
has(key) | Tests whether an object with the specified key exists. |
includes(v) | Tests whether a collection includes an object. (Inherited from IReadOnlyCollection) |
map(callbackfn) | Returns a new collection populated with the results of calling a function on each object. (Inherited from IReadOnlyCollection) |
reduce(callbackfn, initialValue) | Executes a reducer function on each object in the collection, to reduce it to a single object. (Inherited from IReadOnlyCollection) |
reduceRight(callbackfn, initialValue) | Executes a reducer function on each object in the collection in right-to-left order. (Inherited from IReadOnlyCollection) |
some(predicate) | Tests whether at least one object in the collection satisfies a predicate. (Inherited from IReadOnlyCollection) |
toArray() | Returns a new, read-only array that contains all the objects in the collection. (Inherited from IReadOnlyCollection) |