Java Generics and Collections - Helion
ISBN: 978-05-965-5150-6
stron: 286, Format: ebook
Data wydania: 2006-10-17
Księgarnia: Helion
Cena książki: 101,15 zł (poprzednio: 117,62 zł)
Oszczędzasz: 14% (-16,47 zł)
This comprehensive guide shows you how to master the most importantchanges to Java since it was first released. Generics and the greatlyexpanded collection libraries have tremendously increased the power ofJava 5 and Java 6. But they have also confused many developers whohaven't known how to take advantage of these new features.
Java Generics and Collections covers everything from the mostbasic uses of generics to the strangest corner cases. It teaches youeverything you need to know about the collections libraries, so you'llalways know which collection is appropriate for any given task, andhow to use it.
Topics covered include:
- Fundamentals of generics: type parameters and generic methods
- Other new features: boxing and unboxing, foreach loops, varargs
- Subtyping and wildcards
- Evolution not revolution: generic libraries with legacy clients andgeneric clients with legacy libraries
- Generics and reflection
- Design patterns for generics
- Sets, Queues, Lists, Maps, and their implementations
- Concurrent programming and thread safety with collections
- Performance implications of different collections
Generics and the new collection libraries they inspired take Java to anew level. If you want to take your software development practice toa new level, this book is essential reading.
Philip Wadler is Professor of Theoretical Computer Science at theUniversity of Edinburgh, where his research focuses on the design ofprogramming languages. He is a co-designer of GJ, work thatbecame the basis for generics in Sun's Java 5.0.
Maurice Naftalin is Technical Director at Morningside Light Ltd., a software consultancy in the United Kingdom. He has most recently served as an architect and mentor at NSB Retail Systems plc, and as the leader of the client development team of a major UK government social service system.
"A brilliant exposition of generics. By far the best book on thetopic, it provides a crystal clear tutorial that starts with thebasics and ends leaving the reader with a deep understanding of boththe use and design of generics."
Gilad Bracha, Java Generics Lead, Sun Microsystems
Osoby które kupowały "Java Generics and Collections", wybierały także:
- Wprowadzenie do Javy. Programowanie i struktury danych. Wydanie XII 193,23 zł, (59,90 zł -69%)
- Spring i Spring Boot. Kurs video. Testowanie aplikacji i bezpiecze 129,00 zł, (51,60 zł -60%)
- Metoda dziel i zwyci 89,00 zł, (35,60 zł -60%)
- JavaFX. Kurs video. Wzorce oraz typy generyczne 79,00 zł, (31,60 zł -60%)
- Platforma Xamarin. Kurs video. Poziom drugi. Zaawansowane techniki tworzenia aplikacji cross-platform 99,00 zł, (39,60 zł -60%)
Spis treści
Java Generics and Collections eBook -- spis treści
- Java Generics and Collections
- Dedication
- A Note Regarding Supplemental Files
- Preface
- Obtaining the Example Programs
- How to Contact Us
- Conventions Used in This Book
- Using Code Examples
- Safari Books Online
- Acknowledgments
- I. Generics
- 1. Introduction
- Generics
- Boxing and Unboxing
- Foreach
- Generic Methods and Varargs
- Assertions
- 2. Subtyping and Wildcards
- Subtyping and the Substitution Principle
- Wildcards with extends
- Wildcards with super
- The Get and Put Principle
- Arrays
- Wildcards Versus Type Parameters
- Wildcard Capture
- Restrictions on Wildcards
- 3. Comparison and Bounds
- Comparable
- Maximum of a Collection
- A Fruity Example
- Comparator
- Enumerated Types
- Multiple Bounds
- Bridges
- Covariant Overriding
- 4. Declarations
- Constructors
- Static Members
- Nested Classes
- How Erasure Works
- 5. Evolution, Not Revolution
- Legacy Library with Legacy Client
- Generic Library with Generic Client
- Generic Library with Legacy Client
- Legacy Library with Generic Client
- Evolving a Library using Minimal Changes
- Evolving a Library using Stubs
- Evolving a Library using Wrappers
- Conclusions
- 6. Reification
- Reifiable Types
- Instance Tests and Casts
- Exception Handling
- Array Creation
- The Principle of Truth in Advertising
- The Principle of Indecent Exposure
- How to Define ArrayList
- Array Creation and Varargs
- Arrays as a Deprecated Type?
- Summing Up
- 7. Reflection
- Generics for Reflection
- Reflected Types are Reifiable Types
- Reflection for Primitive Types
- A Generic Reflection Library
- Reflection for Generics
- Reflecting Generic Types
- 8. Effective Generics
- Take Care when Calling Legacy Code
- Use Checked Collections to Enforce Security
- Specialize to Create Reifiable Types
- Maintain Binary Compatibility
- 9. Design Patterns
- Visitor
- Interpreter
- Function
- Strategy
- Subject-Observer
- 1. Introduction
- II. Collections
- 10. The Main Interfaces of the Java Collections Framework
- 11. Preliminaries
- Iterable and Iterators
- Implementations
- Efficiency and the O-Notation
- Contracts
- Collections and Thread Safety
- Synchronization and the Legacy Collections
- JDK 1.2: Synchronized Collections and Fail-Fast Iterators
- Concurrent Collections: Java 5 and Beyond
- 12. The Collection Interface
- Using the Methods of Collection
- Implementing Collection
- Collection Constructors
- 13. Sets
- Implementing Set
- HashSet
- LinkedHashSet
- CopyOnWriteArraySet
- EnumSet
- SortedSet and NavigableSet
- NavigableSet
- TreeSet
- ConcurrentSkipListSet
- Comparing Set Implementations
- Implementing Set
- 14. Queues
- Using the Methods of Queue
- Implementing Queue
- PriorityQueue
- ConcurrentLinkedQueue
- BlockingQueue
- Using the Methods of BlockingQueue
- Implementing BlockingQueue
- LinkedBlockingQueue
- ArrayBlockingQueue
- PriorityBlockingQueue
- DelayQueue
- SynchronousQueue
- Deque
- Implementing Deque
- ArrayDeque
- LinkedList
- BlockingDeque
- Implementing BlockingDeque
- Implementing Deque
- Comparing Queue Implementations
- 15. Lists
- Using the Methods of List
- Implementing List
- ArrayList
- LinkedList
- CopyOnWriteArrayList
- Comparing List Implementations
- 16. Maps
- Using the Methods of Map
- Implementing Map
- HashMap
- LinkedHashMap
- WeakHashMap
- IdentityHashMap
- EnumMap
- SortedMap and NavigableMap
- NavigableMap
- TreeMap
- ConcurrentMap
- ConcurrentHashMap
- ConcurrentNavigableMap
- ConcurrentSkipListMap
- Comparing Map Implementations
- 17. The Collections Class
- Generic Algorithms
- Changing the Order of List Elements
- Changing the Contents of a List
- Finding Extreme Values in a Collection
- Finding Specific Values in a List
- Collection Factories
- Wrappers
- Synchronized Collections
- Unmodifiable Collections
- Checked Collections
- Other Methods
- Generic Algorithms
- Index
- About the Authors
- Colophon
- Copyright