Skip to content

Commit

Permalink
fix version in @SInCE
Browse files Browse the repository at this point in the history
  • Loading branch information
robstoll committed Mar 4, 2024
1 parent be0e9e2 commit dbc1baa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/commonMain/kotlin/ch/tutteli/kbox/dynamicTraversal.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -76,7 +76,7 @@ fun <T> Sequence<T>.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
Expand Down Expand Up @@ -107,14 +107,14 @@ fun <T> Sequence<T>.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,

Expand All @@ -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
}
2 changes: 1 addition & 1 deletion src/commonMain/kotlin/ch/tutteli/kbox/failIf.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion src/commonMain/kotlin/ch/tutteli/kbox/takeIf.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <R> takeIf(predicate: Boolean, provider: () -> R): R? = if (predicate) provider() else null

0 comments on commit dbc1baa

Please sign in to comment.