Skip to main content

ObservableMapSet

Holds a map of sets. That is, for a given key, a set of all valid entries. This is great for looking up something that may have duplicate keys, like configurations or other things.

Properties

SetAdded

This item is read only and cannot be modified. Read Only
ObservableMapSet.SetAdded: Signal<TKey>

Fires when an item is added

SetRemoved

This item is read only and cannot be modified. Read Only
ObservableMapSet.SetRemoved: Signal<TKey>

Fires when an item is removed

Functions

new

ObservableMapSet.new() → ObservableMapSet<TKey,TValue>

Constructs a new ObservableMapSet

Add

ObservableMapSet:Add(
entryTValue,
observeKeyObservable<TKey>
) → ()

Adds an entry with a dynamic key. This is great for caching things that need to be looked up by key.

GetSetCount

ObservableMapSet:GetSetCount() → number

Gets how many sets exist

ObserveSetCount

ObservableMapSet:ObserveSetCount() → Observable<number>

Observes how many sets exist

ObserveItemsForKeyBrio

ObservableMapSet:ObserveItemsForKeyBrio(keyTKey) → Observable<Brio<TValue>>

Observes all items for the given key

GetListForKey

ObservableMapSet:GetListForKey(keyTKey) → {TValue}

Gets a list for a given key

GetObservableSetForKey

ObservableMapSet:GetObservableSetForKey(keyTKey) → ObservableSet<TValue>

Gets the observable set for the given key

Destroy

ObservableMapSet:Destroy() → ()

Cleans up the ObservableMapSet and sets the metatable to nil.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new ObservableMapSet",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ObservableMapSet<TKey, TValue>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 26,
                "path": "src/observablecollection/src/Shared/ObservableMapSet.lua"
            }
        },
        {
            "name": "Add",
            "desc": "Adds an entry with a dynamic key. This is great for caching things\nthat need to be looked up by key.",
            "params": [
                {
                    "name": "entry",
                    "desc": "",
                    "lua_type": "TValue"
                },
                {
                    "name": "observeKey",
                    "desc": "",
                    "lua_type": "Observable<TKey>"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 64,
                "path": "src/observablecollection/src/Shared/ObservableMapSet.lua"
            }
        },
        {
            "name": "GetSetCount",
            "desc": "Gets how many sets exist",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 101,
                "path": "src/observablecollection/src/Shared/ObservableMapSet.lua"
            }
        },
        {
            "name": "ObserveSetCount",
            "desc": "Observes how many sets exist",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<number>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 109,
                "path": "src/observablecollection/src/Shared/ObservableMapSet.lua"
            }
        },
        {
            "name": "ObserveItemsForKeyBrio",
            "desc": "Observes all items for the given key",
            "params": [
                {
                    "name": "key",
                    "desc": "",
                    "lua_type": "TKey"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Brio<TValue>>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 118,
                "path": "src/observablecollection/src/Shared/ObservableMapSet.lua"
            }
        },
        {
            "name": "GetListForKey",
            "desc": "Gets a list for a given key",
            "params": [
                {
                    "name": "key",
                    "desc": "",
                    "lua_type": "TKey"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ TValue }"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 160,
                "path": "src/observablecollection/src/Shared/ObservableMapSet.lua"
            }
        },
        {
            "name": "GetObservableSetForKey",
            "desc": "Gets the observable set for the given key",
            "params": [
                {
                    "name": "key",
                    "desc": "",
                    "lua_type": "TKey"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ObservableSet<TValue>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 176,
                "path": "src/observablecollection/src/Shared/ObservableMapSet.lua"
            }
        },
        {
            "name": "Destroy",
            "desc": "Cleans up the ObservableMapSet and sets the metatable to nil.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 290,
                "path": "src/observablecollection/src/Shared/ObservableMapSet.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "SetAdded",
            "desc": "Fires when an item is added",
            "lua_type": "Signal<TKey>",
            "readonly": true,
            "source": {
                "line": 38,
                "path": "src/observablecollection/src/Shared/ObservableMapSet.lua"
            }
        },
        {
            "name": "SetRemoved",
            "desc": "Fires when an item is removed",
            "lua_type": "Signal<TKey>",
            "readonly": true,
            "source": {
                "line": 47,
                "path": "src/observablecollection/src/Shared/ObservableMapSet.lua"
            }
        }
    ],
    "types": [],
    "name": "ObservableMapSet",
    "desc": "Holds a map of sets. That is, for a given key, a set of all valid entries. This is great\nfor looking up something that may have duplicate keys, like configurations or other things.",
    "source": {
        "line": 7,
        "path": "src/observablecollection/src/Shared/ObservableMapSet.lua"
    }
}