Chapter 7. The Main Interfaces of the Java Collections Framework
A collection is an object that provides access to a group of objects, allowing them to be processed in a uniform way. A collections framework provides a uniform view of a set of collection types specifying and implementing common data structures, following consistent design rules so that they can work together.
Figure 7-1 shows the main interfaces of the Java Collections Framework, together with one other—Iterable
—which is outside the Framework. Iterable
(see “Iterable and Iterators”) defines the contract that a class—any class, not only one of those in the Framework—must implement in order to be used as the target for an “enhanced for
statement”, usually called a foreach statement.
The central interface ...
Get Java Generics and Collections, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.