An introduction to collections
The collections framework is a set of classes and interfaces that provides a unified architecture for performing common groups of data related operations, such as the following:
- Searching
- Sorting
- Insertion
- Deletion
- Manipulation
All the lists, maps, and sets we use in our programs everyday are part of this collections framework.
All collections frameworks contain the following things:
- Interfaces: These are abstract data types are used to represent collections. Interfaces allow collections to be manipulated independent of the details of their representation. In object-oriented languages, these are generally interfaces form a hierarchy.
- Implementations: These are concrete implementations of the collection of interfaces. In essence, these are reusable data structures.
- Algorithms: Methods that perform useful computations, such as searching and sorting (as listed earlier), on objects that implement collection interfaces. These algorithms are said to be polymorphic. The same...