Scala CollectionScala provides rich set of collection library. It contains classes and traits to collect data. These collections can be mutable or immutable. You can use them according to your requirement. Scala.collection.mutable package contains all the mutable collections. You can add, remove and update data while using this package. Scala.collection.immutable contains all the immutable collections. It does not allow you to modify data. Scala imports this package by default. If you want mutable collection, you must import scala.collection.mutable package in your code. Scala Immutable Collections HierarchyThe scala.collection.immutable package contains all the immutable abstract classes and traits for collections. ![]() Scala TraversableIt is a trait and used to traverse collection elements. It is a base trait for all scala collections. It implements the methods which are common to all collections. Some Significant Methods of Traversable Trait
Scala IterableIt is a next trait from the top of the hierarchy and a base trait for iterable collections. It extends traversable trait and provides important methods to concrete classes.
Next TopicScala Set
|