// // NOTE THIS FILE IS AUTO-GENERATED by the GenerateStandardLib.kt // See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib // // Generated from input file: src/kotlin/JUtilCollections.kt // package kotlin import java.util.* // // This file contains methods which are optimised for working on Collection / Array collections where the size // could be used to implement a more optimal solution // // See [[GenerateStandardLib.kt]] for more details // /** * Returns a new List containing the results of applying the given *transform* function to each element in this collection * * @includeFunctionBody ../../test/CollectionTest.kt map */ public inline fun java.lang.Iterable.map(transform : (T) -> R) : java.util.List { return mapTo(java.util.ArrayList(), transform) } /** * Transforms each element of this collection with the given *transform* function and * adds each return value to the given *results* collection */ public inline fun > java.lang.Iterable.mapTo(result: C, transform : (T) -> R) : C { for (item in this) result.add(transform(item)) return result }