Java Collections

Free Download

Authors:

ISBN: 1893115925, 9781893115927

Size: 1 MB (1404924 bytes)

Pages: 295/295

File format:

Language:

Publishing Year:

Category: Tags: , ,

John Zukowski1893115925, 9781893115927

The Collections Framework is supplied with all versions of the Java 2 platform and provides programmers with incredibly efficient ways to manipulate data. However, given the large number of methods and classes in this library, using them correctly is hardly a cakewalk. Well-known columnist and bestselling author John Zukowski gives the Java professional exactly what he or she needs to know about this vital library in order to maximize productivity. This practical book contains comprehensive coverage of the important Collections Framework from the working programmer’s point of view, while staying away from academic abstractions.
Java Collections leads you through the standard Java support for maintaining abstract groups of data, from the historical collection classes available since the inception of Java time, through the Collections Framework introduced with the Java 2 platform, and on to third-party alternative libraries for times when the standard support isn’t enough. If you’re working with data in Java programs, you need to understand the Collections Framework. Let Zukowski’s Java Collections be your guide!

Table of contents :
Table of Contents……Page 5
What Is This Book About?……Page 14
How Is This Book Structured?……Page 15
How Do I Read the Diagrams?……Page 16
Part I: The Historical Collection Classes……Page 17
Array Basics……Page 18
Declaring and Creating Arrays……Page 20
Arrays of Primitives……Page 21
Multidimensional Arrays……Page 22
Initializing Arrays……Page 24
Passing Array Arguments and Return Values……Page 25
Copying and Cloning Arrays……Page 26
Array Assignments……Page 27
Checking for Array Equality……Page 28
Array Reflection……Page 29
Character Arrays……Page 32
Summary……Page 33
Vector Basics……Page 34
Creating Vectors……Page 36
Adding Elements……Page 37
Removing Elements……Page 39
Replacing Elements……Page 41
Sizing Vectors……Page 42
Fetching Elements……Page 43
Finding Elements……Page 45
Copying and Cloning Vectors……Page 47
Serializing Vector……Page 50
Maintaining Listener Lists with a Vector……Page 51
Variables Defined with Vector……Page 55
Stack Basics……Page 56
Operating Stacks……Page 57
Stack Example……Page 58
Summary……Page 59
Enumeration Basics……Page 60
The SequenceInputStream Class……Page 61
Creating Custom Enumerations……Page 62
Summary……Page 64
Dictionary Basics……Page 65
Hashtable Basics……Page 66
Understanding Hash Tables……Page 67
Adding Key-Value Pairs……Page 69
Sizing Hash Tables……Page 70
Fetching Keys and Values……Page 71
Finding Elements……Page 72
Hashtable Immutability……Page 73
Counting Word Occurrences……Page 74
UIDefaults Demonstration……Page 76
Properties Basics……Page 77
Setting and Getting Elements……Page 78
Loading and Saving……Page 79
System Properties……Page 80
Working with Security Providers……Page 82
Summary……Page 85
BitSet Basics……Page 86
Manipulating Individual Bits……Page 87
Manipulating Sets of Bits……Page 88
Hashing Bit Sets……Page 89
Using BitSet: an Example……Page 90
Summary……Page 91
Part II: The Collections Framework……Page 92
Framework Interfaces……Page 93
Framework Implementations……Page 94
Collection Interface……Page 95
Adding Elements……Page 96
Removing Elements……Page 97
Fetching Elements……Page 98
Copying and Cloning Collections……Page 99
Checking for Equality……Page 100
Using an Iterator……Page 101
Filtering Iterator……Page 102
ConcurrentModificationException……Page 104
Summary……Page 105
Set Basics……Page 106
HashSet Class……Page 107
Adding Elements……Page 108
Removing Elements……Page 109
Fetching Elements……Page 111
Copying and Cloning Sets……Page 112
TreeSet Class……Page 114
Creating a TreeSet……Page 115
Comparing……Page 116
Working with Subsets……Page 117
Summary……Page 119
List Basics……Page 120
What’s New……Page 121
Usage Issues……Page 122
ArrayList Class……Page 123
Adding Elements……Page 124
Removing Elements……Page 126
Finding Elements……Page 128
Replacing Elements……Page 129
Copying and Cloning Lists……Page 130
Hashing Lists……Page 131
LinkedList Class……Page 132
Removing Elements……Page 133
LinkedList Example……Page 134
ListIterator……Page 136
Summary……Page 138
Map Basics……Page 140
Map.Entry Interface……Page 141
Creating a HashMap……Page 143
Displaying Contents……Page 144
Sizing Hash Maps……Page 145
Finding Elements……Page 146
Serializing Hash Maps……Page 147
Understanding Weak References……Page 148
Using a WeakHashMap……Page 149
WeakHashMap Example……Page 150
TreeMap Class……Page 154
Viewing Sub Maps……Page 155
Map Usage……Page 156
Summary……Page 159
System-Defined Comparable Classes……Page 160
Using Comparable……Page 161
Understanding Comparator……Page 163
Using Comparator……Page 164
SortedSet……Page 165
Understanding SortedSet……Page 166
SortedMap……Page 168
Understanding SortedMap……Page 169
Summary……Page 170
Overview……Page 171
Singleton Collections……Page 172
Read-Only Collections……Page 173
Thread-Safe Collections……Page 174
Sorting Lists……Page 175
Binary Searching……Page 176
Finding Extremes……Page 178
Filling Lists……Page 179
Reversing Lists……Page 180
Sorting Lists……Page 181
Summary……Page 182
Filling Arrays……Page 183
Checking Equality……Page 185
Primitive Arrays……Page 186
Object Arrays……Page 187
Primitive Arrays……Page 188
Summary……Page 190
AbstractCollection Class……Page 191
Implementing Optional Methods……Page 192
Creating a Custom Set……Page 193
AbstractList Class……Page 195
Implementing Optional Methods……Page 196
Subclassing AbstractSequentialList……Page 197
AbstractMap Class……Page 198
Creating a Custom Map……Page 199
Summary……Page 202
Enumerations……Page 203
Enumerations……Page 205
Working with JDK 1.1……Page 206
Comparing Objects with JDK 1.1……Page 207
Summary……Page 209
Priority Queue……Page 211
Multimap……Page 216
Soft Hash Map……Page 220
Finding Additional Collections……Page 225
Summary……Page 226
Part III: Alternative Collection Libraries……Page 227
Acquisition……Page 228
Installation……Page 229
Usage……Page 232
Collection Classes……Page 233
Algorithm Support……Page 237
Functions and Predicates……Page 239
Summary……Page 241
Installation……Page 242
Product Support……Page 243
Sync Interface……Page 244
ReadWriteLock Interface……Page 247
Collection Classes……Page 248
Copy-on-Write Collections……Page 249
Synchronized Collections……Page 250
Summary……Page 251
Installation……Page 253
Licensing and Redistribution Rights……Page 254
Other Libraries……Page 255
Key Classes and Interfaces……Page 256
Package cern.colt……Page 257
Package cern.colt.list and cern.colt.list.adapter……Page 258
Package cern.colt.buffer……Page 259
Package cern.colt.map……Page 261
Summary……Page 262
Class, Method, and Field Index……Page 263
AbstractCollection Class……Page 268
AbstractMap Class……Page 269
ArrayList Class……Page 270
BitSet Class……Page 271
Collections Class……Page 272
Comparator Interface……Page 273
HashMap Class……Page 274
Hashtable Class……Page 275
LinkedList Class……Page 276
List Interface……Page 277
Map Interface……Page 278
Set Interface……Page 279
SortedSet Interface……Page 280
TreeMap Class……Page 281
Vector Class……Page 282
WeakHashMap Class……Page 284
Collections Implementations……Page 285
Mailing Lists and Newsgroups……Page 286
Collections-Related Web Sites and Information……Page 287
Generic Type Basics……Page 288
Defining Generic Classes and Interfaces……Page 289
Using Generic Classes……Page 290
Defining Generic Classes and Interfaces……Page 291
JSR 14……Page 292
Errata……Page 293

Reviews

There are no reviews yet.

Be the first to review “Java Collections”
Shopping Cart
Scroll to Top