From dbc1baad2edea20b1345363a43ad8984203d696f Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Mon, 4 Mar 2024 17:47:26 +0100 Subject: [PATCH] fix version in @since --- .../kotlin/ch/tutteli/kbox/dynamicTraversal.kt | 10 +++++----- src/commonMain/kotlin/ch/tutteli/kbox/failIf.kt | 2 +- src/commonMain/kotlin/ch/tutteli/kbox/takeIf.kt | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/commonMain/kotlin/ch/tutteli/kbox/dynamicTraversal.kt b/src/commonMain/kotlin/ch/tutteli/kbox/dynamicTraversal.kt index bf54c8c..8275698 100644 --- a/src/commonMain/kotlin/ch/tutteli/kbox/dynamicTraversal.kt +++ b/src/commonMain/kotlin/ch/tutteli/kbox/dynamicTraversal.kt @@ -27,7 +27,7 @@ import kotlin.jvm.JvmName * @param loadElements the function returning the children of a given element in case of a tree / the connected nodes * in case of a graph. * - * @since 1.0.0 + * @since 1.1.0 */ @OptIn(ExperimentalTypeInference::class) @OverloadResolutionByLambdaReturnType @@ -76,7 +76,7 @@ fun Sequence.dynamicTraversal( * @param loadElements the function returning the children of a given element in case of a tree / the connected nodes * in case of a graph. * - * @since 1.0.0 + * @since 1.1.0 */ @OptIn(ExperimentalTypeInference::class) @OverloadResolutionByLambdaReturnType @@ -107,14 +107,14 @@ fun Sequence.dynamicTraversal( /** * Represents the option to which traversal algorithm shall be applied. * - * @since 1.0.0 + * @since 1.1.0 */ enum class TraversalAlgorithmOption { /** Taking the tree as example, the resulting sequence contains the result in a breath first manner, * i.e. if `dropRoots = false` then the elements of the original sequence are returned first (if `dropRoots] = true` * then they are skipped/dropped), then the children of those elements, then the children of the children and so on. * - * @since 1.0.0 + * @since 1.1.0 */ BreadthFirst, @@ -126,7 +126,7 @@ enum class TraversalAlgorithmOption { * Once there is no first child (i.e. we reached a leaf of the tree) the sibling of this child is visited, and again * the first child of this sibling etc. * - * @since 1.0.0 + * @since 1.1.0 */ DepthFirst } diff --git a/src/commonMain/kotlin/ch/tutteli/kbox/failIf.kt b/src/commonMain/kotlin/ch/tutteli/kbox/failIf.kt index 0c4fed9..050654d 100644 --- a/src/commonMain/kotlin/ch/tutteli/kbox/failIf.kt +++ b/src/commonMain/kotlin/ch/tutteli/kbox/failIf.kt @@ -6,6 +6,6 @@ package ch.tutteli.kbox * @param predicate the predicate which defines if the exception should be thrown or not. * @param errorMessage The message which as [IllegalStateException.message] * - * @since 1.0.0 + * @since 1.1.0 */ inline fun failIf(predicate: Boolean, errorMessage: () -> String) = check(predicate.not(), errorMessage) diff --git a/src/commonMain/kotlin/ch/tutteli/kbox/takeIf.kt b/src/commonMain/kotlin/ch/tutteli/kbox/takeIf.kt index 8252cd6..32ae9d5 100644 --- a/src/commonMain/kotlin/ch/tutteli/kbox/takeIf.kt +++ b/src/commonMain/kotlin/ch/tutteli/kbox/takeIf.kt @@ -7,6 +7,6 @@ package ch.tutteli.kbox * is high or the code involved to define the provider is long and a postfix `takeIf` is less readable * than stating it at the beginning. * - * @since 1.0.0 + * @since 1.1.0 */ inline fun takeIf(predicate: Boolean, provider: () -> R): R? = if (predicate) provider() else null