setTags

fun <T : U, U : Taggable<U>, X : Any> T.setTags(tags: Map<String, X>): T

Returns a new instance, otherwise equivalent to this one, whose Taggable.tags are entirely replaced by tags (i.e. this is not a merge: any previously attached tag not present in tags is dropped). Thin, type-preserving wrapper around Taggable.replaceTags.


fun <T : U, U : Taggable<U>, X : Any> T.setTags(tag: Pair<String, X>, vararg otherTags: Pair<String, X>): T

Same as setTags, taking the replacement tags as a tag (and any otherTags) rather than as a Map.