Book Image

Programming Kotlin

Book Image

Programming Kotlin

Overview of this book

Quickly learn the fundamentals of the Kotlin language and see it in action on the web. Easy to follow and covering the full set of programming features, this book will get you fluent in Kotlin for Android.
Table of Contents (20 chapters)
Programming Kotlin
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Chapter 10. Collections

Most of us developers write a lot of code which ends up processing a collection of items, such as lists, maps, sets. Getting familiar with, and understanding the Kotlin standard library for collections is key to any aspiring Kotlin developer. If you have been working with Scala collections, you will find quite a few similarities. However, if your development background is Java only, you will find a new and improved way of dealing with your collections of objects, and will probably appreciate how easy it is to achieve a lot with very little code.

This chapter covers the Kotlin standard library for collections, and you will learn how it extends the Java collections library to make your daily coding a lot easier. It will present the two flavors of collections: mutable and immutable. You will learn how this is achieved, and how it works when interacting with Java code. The chapter will finish with an introduction to the streaming API.