Skip to main content

BoundChildCollection

Tracks child of type of a binder.

Properties

ClassAdded

BoundChildCollection.ClassAdded: Signal<T>

Fires on class addition

ClassRemoved

BoundChildCollection.ClassRemoved: Signal<T>

Fires on class removal

Functions

new

BoundChildCollection.new(
binderBinder<T>,
parentInstance
) → BoundChildCollection<T>

Constructcs a new BoundChildCollection.

HasClass

BoundChildCollection:HasClass(classT) → boolean?--

true if the class exists, nil otherwise

Returns whether the track has the class

GetSize

BoundChildCollection:GetSize() → number

Gets the size

GetSet

BoundChildCollection:GetSet() → {[T]=true}--

The set

Returns the raw classes variable as [class] = true.

warning

Do not modify the set

GetClasses

BoundChildCollection:GetClasses() → {T}

Slow than :GetSet(), but adds them in an ordered list

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructcs a new BoundChildCollection.",
            "params": [
                {
                    "name": "binder",
                    "desc": "",
                    "lua_type": "Binder<T>"
                },
                {
                    "name": "parent",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "BoundChildCollection<T>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 21,
                "path": "src/binder/src/Shared/Collection/BoundChildCollection.lua"
            }
        },
        {
            "name": "HasClass",
            "desc": "Returns whether the track has the class",
            "params": [
                {
                    "name": "class",
                    "desc": "",
                    "lua_type": "T"
                }
            ],
            "returns": [
                {
                    "desc": "true if the class exists, nil otherwise",
                    "lua_type": "boolean?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 61,
                "path": "src/binder/src/Shared/Collection/BoundChildCollection.lua"
            }
        },
        {
            "name": "GetSize",
            "desc": "Gets the size",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 69,
                "path": "src/binder/src/Shared/Collection/BoundChildCollection.lua"
            }
        },
        {
            "name": "GetSet",
            "desc": "Returns the raw classes variable as [class] = true.\n\n:::warning\nDo not modify the set\n:::",
            "params": [],
            "returns": [
                {
                    "desc": "The set",
                    "lua_type": "{ [T] = true }"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 82,
                "path": "src/binder/src/Shared/Collection/BoundChildCollection.lua"
            }
        },
        {
            "name": "GetClasses",
            "desc": "Slow than :GetSet(), but adds them in an ordered list",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ T }"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 90,
                "path": "src/binder/src/Shared/Collection/BoundChildCollection.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "ClassAdded",
            "desc": "Fires on class addition",
            "lua_type": "Signal<T>",
            "source": {
                "line": 32,
                "path": "src/binder/src/Shared/Collection/BoundChildCollection.lua"
            }
        },
        {
            "name": "ClassRemoved",
            "desc": "Fires on class removal",
            "lua_type": "Signal<T>",
            "source": {
                "line": 39,
                "path": "src/binder/src/Shared/Collection/BoundChildCollection.lua"
            }
        }
    ],
    "types": [],
    "name": "BoundChildCollection",
    "desc": "Tracks child of type of a binder.",
    "source": {
        "line": 5,
        "path": "src/binder/src/Shared/Collection/BoundChildCollection.lua"
    }
}