commonMain.aws.smithy.kotlin.runtime.util.Convenience.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utils-jvm Show documentation
Show all versions of utils-jvm Show documentation
Utilities for working with the Smithy runtime
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
package aws.smithy.kotlin.runtime.util
import kotlin.jvm.JvmName
/**
* Determines the length of a collection. This is a synonym for [Collection.size].
*/
val Collection.length: Int
get() = size
@JvmName("noOpUnnestedCollection")
inline fun Collection.flattenIfPossible(): Collection = this
@JvmName("flattenNestedCollection")
inline fun Collection>.flattenIfPossible(): Collection = flatten()
© 2015 - 2025 Weber Informatics LLC | Privacy Policy