Java Generics and Collections: Fundamentals and Recommended Practices, 2nd Edition (Final Release)КНИГИ » ПРОГРАММИНГ
Название: Java Generics and Collections: Fundamentals and Recommended Practices, 2nd Edition (Final Release) Автор: Maurice Naftalin, Philip Wadler Издательство: O’Reilly Media, Inc. Год: 2025 Страниц: 401 Язык: английский Формат: pdf, epub Размер: 10.1 MB
Java Generics and Collections has been the go-to guide to generics for more than a decade. This second edition covers Java 21, providing a clear guide to generics from their most common uses to the strangest corner cases, giving you everything you need to know to use and write generic APIs effectively. It covers the collections library thoroughly, so you'll always know how and when to use each collection for any given task. And it explains stream processing, so you'll know which model to use and how they interoperate to get the best out of the platform library.
This indispensable guide covers:
Fundamentals of generics: type parameters and generic methods Subtyping and wildcards Generics and reflection Design patterns for generics Sets, queues, lists, maps, and their implementations Concurrent programming and thread safety with collections Performance of different collection implementations Best practices for using and extending the Java collections framework Design philosophy and comparison with other collections libraries
The second edition of this book is a comprehensive update for Java 21. Since a major impetus for writing it was the introduction of sequenced collections and the earlier impact of streams and lambdas, I expected before starting work that the major changes needed would be in Part II, principally as a result of the introduction of sequenced collections. However, that was a serious underestimate of the changes that Java has undergone in the last 20 years: in fact, many revisions to Part I were also required. The language has changed; it now supports records, local variable type inference, pattern-matching expressions, and generic types in type comparison expressions. Also, most examples in Part I needed updating to take account of changes in the platform libraries, including the current deprecation of the Integer constructors, static methods on the Comparator interface, and the introduction of unmodifiable collections and of streams.
Intended Audience: This book is intended for everyone who knows something about Java and would like to find out more. It’s not a Java tutorial, so we assume knowledge of basic Java concepts like classes, static and instance methods, and so on. We use the syntax of Java 21, but most syntax features associated specifically with generics are explained in the text. If you are having difficulty understanding the syntax of a particular code sample, you may find that your integrated development environment (IDE) can offer helpful refactoring suggestions that will clarify its purpose.
We assume very basic knowledge of the Collections API. If you have written any programs using ArrayList or HashSet, you should have no difficulty. When discussing the behavior of particular collection classes and methods, we often refer to the Javadoc. When in doubt, the Javadoc provides the definitive specification.
Скачать Java Generics and Collections: Fundamentals and Recommended Practices, 2nd Edition (Final Release)