Abstract
In the Collections framework, lists, sets, and maps as key-value stores are implemented by so-called container classes. They manage objects of other classes. The interfaces List<E>, Set<E>, and Map<K,V> from the package java.util serve as the basis for the container classes. They store object references. Thus, processing primitive types is only possible if they are converted to a wrapper object (such as Byte, Integer, or Double). This is done automatically by the auto-boxing/unboxing implicit since Java 5.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Please note that java.util.Stack was created long before the Collections Framework existed and is based on java.util.Vector. The class Stack was later refactored so that it could be integrated into the Collection framework. But, even in the beginning, it should not have to be derived from Vector. Instead, delegation would have been appropriate.
- 2.
For details, see my book Der Weg zum Java-Profi [Ind20a].
- 3.
Records are treated in greater in detail in my book Java – die Neuerungen in Version 9 bis 14: Modularisierung, Syntax- und API-Erweiterungen [Ind20b].
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature
About this chapter
Cite this chapter
Inden, M. (2022). Basic Data Structures: Lists, Sets, and Maps. In: Java Challenges. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-7395-1_7
Download citation
DOI: https://doi.org/10.1007/978-1-4842-7395-1_7
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-7394-4
Online ISBN: 978-1-4842-7395-1
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)