Add new utility methods

This commit is contained in:
Vitor Pamplona
2026-03-24 09:39:09 -04:00
parent 3d9efa9938
commit c39eca5172
@@ -91,6 +91,16 @@ class TagArrayBuilder<T : IEvent> {
return this
}
fun addAllUnique(tag: Array<Array<String>>): TagArrayBuilder<T> {
tag.forEach(::addUnique)
return this
}
fun addAllUniqueValueIfNew(tag: List<Array<String>>): TagArrayBuilder<T> {
tag.forEach(::addUniqueValueIfNew)
return this
}
fun toTypedArray() = tagList.flatMap { it.value }.toTypedArray()
fun build() = toTypedArray()