SetCollector

abstract class SetCollector<T>(source)

Base DSL collector for accumulating a unique set of values.

This abstract class is intended to be extended by DSL builders that collect values where uniqueness is required (e.g. permissions, fixed values).

Values can be added either via the unary + operator (idiomatic DSL usage) or explicitly using add. The collected values are exposed only through build, ensuring immutability outside the DSL scope.

This class is marked with FF4kDsl to prevent accidental scope leakage when used inside nested DSL blocks.

Parameters

T

the type of elements collected by this builder

Inheritors

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun add(value: T)

Adds a value to the collector explicitly.

Link copied to clipboard
operator fun T.unaryPlus()

Adds this value to the collector.