Kotlin Training Program

DOWNLOAD APP

FEEDBACK

Collections

The Kotlin STL’s collections package offers various classes & functions that allows us to work with complex data structures like Arrays, ArrayLists, Sets, Maps etc. Let us understand each of these data structures & their usage.

Arrays

ArrayLists

Sets

Map

Advanced Operations

Kotlin STL provides lot of other functions to perform advanced operations on Collections (Range, Arrays, Lists, Sets, Maps etc.). Some of the most widely used are explained below.

Note : In the following sections List refers to List based collections : Array, Set & List.

all(), any() functions

count() function

Safe get()

Reverse

Filter

Transform

Reduce

Association

Grouping