did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780596527754

Java Generics And Collections

by
  • ISBN13:

    9780596527754

  • ISBN10:

    0596527756

  • Format: Paperback
  • Copyright: 2006-10-01
  • Publisher: Oreilly & Associates Inc

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $34.99 Save up to $11.72
  • Rent Book $23.27
    Add to Cart Free Shipping Icon Free Shipping

    TERM
    PRICE
    DUE
    USUALLY SHIPS IN 3-5 BUSINESS DAYS
    *This item is part of an exclusive publisher rental program and requires an additional convenience fee. This fee will be reflected in the shopping cart.

Supplemental Materials

What is included with this book?

Summary

Java Generics was probably the most important feature added to the Java Language for Java 5.0. This book, written by one of the designers of generics, is a thorough explanation of how to use generics, and particularly, the effect this facility has on the way you use collections. Generics and collections allow for greater reuse of source code. While the benefits are great, it takes extra effort for developers to generify code. This book explains why the effort is well worth the gains and teaches Java developers how to use a generic library, how to write a generic library and specify collection types, and how to generify an existing library of legacy code. Java Generics and Collections provides helpful hints and exercises that show the reader how to avoid the pitfalls of generics and speed up their Java development process.

Author Biography

Maurice Naftalin is Director of Software Development at Morningside Light Ltd., a software consultancy in the United Kingdom. Maurice consults mainly in object-oriented technologies and teaches Java classes part-time at Learning Tree. He has three decades' experience as a programmer, team leader, and commercial trainer.

Philip Wadler is a professor of theoretical computer science at the University of Edinburgh, Scotland, where his research focuses on functional and logic programming. He co-authored the Generic Java standard that became the basis for generics in Sun's Java 5.0 and also contributed to the XQuery language standard base. Professor Wadler received his Ph.D., in computer science from Carnegie-Mellon University and co-wrote "Introduction to Functional Programming" (Prentice-Hall).

Table of Contents

Preface xiii
Part I Generics
Introduction
3(12)
Generics
4(3)
Boxing and Unboxing
7(2)
Foreach
9(1)
Generic Methods and Varargs
10(3)
Assertions
13(2)
Subtyping and Wildcards
15(16)
Subtyping and the Substitution Principle
15(2)
Wildcards with extends
17(1)
Wildcards with super
18(1)
The Get and Put Principle
19(3)
Arrays
22(3)
Wildcards Versus Type Parameters
25(2)
Wildcard Capture
27(1)
Restrictions on Wildcards
28(3)
Comparison and Bounds
31(22)
Comparable
31(3)
Maximum of a Collection
34(2)
A Fruity Example
36(1)
Comparator
37(6)
Enumerated Types
43(4)
Multiple Bounds
47(1)
Bridges
48(2)
Covariant Overriding
50(3)
Declarations
53(8)
Constructors
53(1)
Static Members
54(1)
Nested Classes
55(3)
How Erasure Works
58(3)
Evolution, Not Revolution
61(14)
Legacy Library with Legacy Client
62(1)
Generic Library with Generic Client
62(2)
Generic Library with Legacy Client
64(3)
Legacy Library with Generic Client
67(6)
Evolving a Library using Minimal Changes
67(3)
Evolving a Library using Stubs
70(1)
Evolving a Library using Wrappers
71(2)
Conclusions
73(2)
Reification
75(24)
Reifiable Types
75(1)
Instance Tests and Casts
76(5)
Exception Handling
81(2)
Array Creation
83(1)
The Principle of Truth in Advertising
84(5)
The Principle of Indecent Exposure
89(2)
How to Define ArrayList
91(1)
Array Creation and Varargs
92(3)
Arrays as a Deprecated Type?
95(2)
Summing Up
97(2)
Reflection
99(14)
Generics for Reflection
99(2)
Reflected Types are Reifiable Types
101(2)
Reflection for Primitive Types
103(1)
A Generic Reflection Library
103(3)
Reflection for Generics
106(2)
Reflecting Generic Types
108(5)
Effective Generics
113(14)
Take Care when Calling Legacy Code
113(2)
Use Checked Collections to Enforce Security
115(1)
Specialize to Create Reifiable Types
116(5)
Maintain Binary Compatibility
121(6)
Design Patterns
127(24)
Visitor
127(4)
Interpreter
131(1)
Function
132(3)
Strategy
135(6)
Subject-Observer
141(10)
Part II Collections
The Main Interfaces of the Java Collections Framework
151(2)
Preliminaries
153(14)
Iterable and Iterators
153(2)
Implementations
155(1)
Efficiency and the O-Notation
156(1)
Contracts
157(2)
Collections and Thread Safety
159(8)
Synchronization and the Legacy Collections
161(1)
JDK 1.2: Synchronized Collections and Fail-Fast Iterators
162(2)
Concurrent Collections: Java 5 and Beyond
164(3)
The Collection Interface
167(10)
Using the Methods of Collection
170(6)
Implementing Collection
176(1)
Collection Constructors
176(1)
Sets
177(20)
Implementing Set
177(7)
HashSet
178(2)
LinkedHashSet
180(1)
CopyOnWriteArraySet
181(1)
EnumSet
182(2)
SortedSet and NavigableSet
184(11)
TreeSet
190(3)
ConcurrentSkipListSet
193(2)
Comparing Set Implementations
195(2)
Queues
197(22)
Using the Methods of Queue
199(2)
Implementing Queue
201(2)
PriorityQueue
201(2)
ConcurrentLinkedQueue
203(1)
BlockingQueue
203(9)
Using the Methods of BlockingQueue
205(3)
Implementing BlockingQueue
208(4)
Deque
212(4)
Implementing Deque
214(1)
BlockingDeque
215(1)
Comparing Queue Implementations
216(3)
Lists
219(10)
Using the Methods of List
221(3)
Implementing List
224(3)
ArrayList
224(2)
LinkedList
226(1)
CopyOnWriteArrayList
227(1)
Comparing List Implementations
227(2)
Maps
229(18)
Using the Methods of Map
231(1)
Implementing Map
232(7)
HashMap
233(1)
LinkedHashMap
233(2)
WeakHashMap
235(2)
IdentityHashMap
237(2)
EnumMap
239(1)
SortedMap and NavigableMap
239(4)
TreeMap
243(1)
ConcurrentMap
243(2)
ConcurrentHashMap
244(1)
ConcurrentNavigableMap
245(1)
ConcurrentSkipListMap
245(1)
Comparing Map Implementations
245(2)
The Collections Class
247(8)
Generic Algorithms
247(3)
Changing the Order of List Elements
247(1)
Changing the Contents of a List
248(1)
Finding Extreme Values in a Collection
249(1)
Finding Specific Values in a List
249(1)
Collection Factories
250(1)
Wrappers
251(2)
Synchronized Collections
251(1)
Unmodifiable Collections
252(1)
Checked Collections
252(1)
Other Methods
253(2)
Index 255

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program