Java Generics and Collections (e-book) Tarnowskie Góry

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 …

od 92,65 Najbliżej: 21 km

Liczba ofert: 1

Oferta sklepu

Opis

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 methodsOther new features: boxing and unboxing, foreach loops, varargsSubtyping and wildcardsEvolution not revolution: generic libraries with legacy clients andgeneric clients with legacy librariesGenerics and reflectionDesign patterns for genericsSets, Queues, Lists, Maps, and their implementationsConcurrent programming and thread safety with collectionsPerformance implications of different collectionsGenerics 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 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 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 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 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 Index About the Authors Colophon Copyright

Specyfikacja

Podstawowe informacje

Autor
  • Maurice Naftalin, Philip Wadler
Rok wydania
  • 2006
Ilość stron
  • 286
Kategorie
  • Programowanie
Wybrane wydawnictwa
  • O'Reilly Media