aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-08-17 08:49:22 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-17 11:52:28 +0200
commit89ddbd2603e24a349314c4be151edb25f0d2af31 (patch)
tree4654b6973cccd4c8478425d4b948c8c6b81e2ede /core/src/main
parent6f40db680336e7f3b4b68a8d4ad7b8a7ffe33270 (diff)
downloaddokka-89ddbd2603e24a349314c4be151edb25f0d2af31.tar.gz
dokka-89ddbd2603e24a349314c4be151edb25f0d2af31.tar.bz2
dokka-89ddbd2603e24a349314c4be151edb25f0d2af31.zip
Implement CompositeSourceSetID.plus API
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/kotlin/model/CompositeSourceSetID.kt8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/main/kotlin/model/CompositeSourceSetID.kt b/core/src/main/kotlin/model/CompositeSourceSetID.kt
index 5eb106bf..3c1cf7de 100644
--- a/core/src/main/kotlin/model/CompositeSourceSetID.kt
+++ b/core/src/main/kotlin/model/CompositeSourceSetID.kt
@@ -27,4 +27,12 @@ data class CompositeSourceSetID(
operator fun contains(sourceSet: DokkaConfiguration.DokkaSourceSet): Boolean {
return sourceSet.sourceSetID in this
}
+
+ operator fun plus(other: DokkaSourceSetID): CompositeSourceSetID {
+ return copy(children = children + other)
+ }
+}
+
+operator fun DokkaSourceSetID.plus(other: DokkaSourceSetID): CompositeSourceSetID {
+ return CompositeSourceSetID(listOf(this, other))
}