Chapter 6. The Collection Framework

The collection framework is a set of high-performance classes used to store and manipulate groups of objects. This framework allows different types of collections to work in a similar manner and is designed around a set of standard interfaces. Several standard implementations of interfaces can be extended or adapted very easily. In this chapter, we will cover the following topics:

  • An introduction to the collection framework
  • Ordering of elements in collections
  • Class hierarchy of the main interfaces
  • The Iterable and Iterator interfaces
  • The List, Set, Queue, and Map collections implementation
  • Immutable collections
  • Choosing the right collection

A Dart collection framework

In general, a collection is an object that holds a group of objects. Each item in a collection is called an element. A Dart collection framework has the following benefits:

  • It is a set of interfaces that forces developers to adopt some design principles
  • It can improve the performance of applications significantly

A framework provides a unified interface to store and manipulate the elements of a collection and hide the actual implementation. The Dart implementation of collections is highly optimized for execution in Dart and JavaScript VMs and is far more efficient than what you could create yourself.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.163.62