| |
| |
The Developer's Notebook Series | |
| |
| |
Preface | |
| |
| |
| |
What's New? | |
| |
| |
Working with Arrays | |
| |
| |
Using Queues | |
| |
| |
Ordering Queues Using Comparators | |
| |
| |
Overriding Return Types | |
| |
| |
Taking Advantage of Better Unicode | |
| |
| |
Adding StringBuilder to the Mix | |
| |
| |
| |
Generics | |
| |
| |
Using Type-Safe Lists | |
| |
| |
Using Type-Safe Maps | |
| |
| |
Iterating Over Parameterized Types | |
| |
| |
Accepting Parameterized Types as Arguments | |
| |
| |
Returning Parameterized Types | |
| |
| |
Using Parameterized Types as Type Parameters | |
| |
| |
Checking for Lint | |
| |
| |
Generics and Type Conversions | |
| |
| |
Using Type Wildcards | |
| |
| |
Writing Generic Types | |
| |
| |
Restricting Type Parameters | |
| |
| |
| |
Enumerated Types | |
| |
| |
Creating an Enum | |
| |
| |
Declaring Enums Inline | |
| |
| |
Iterating Over Enums | |
| |
| |
Switching on Enums | |
| |
| |
Maps of Enums | |
| |
| |
Sets of Enums | |
| |
| |
Adding Methods to an Enum | |
| |
| |
Implementing Interfaces with Enums | |
| |
| |
Value-Specific Class Bodies | |
| |
| |
Manually Defining an Enum | |
| |
| |
Extending an Enum | |
| |
| |
| |
Autoboxing and Unboxing | |
| |
| |
Converting Primitives to Wrapper Types | |
| |
| |
Converting Wrapper Types to Primitives | |
| |
| |
Incrementing and Decrementing Wrapper Types | |
| |
| |
Boolean Versus boolean | |
| |
| |
Conditionals and Unboxing | |
| |
| |
Control Statements and Unboxing | |
| |
| |
Method Overload Resolution | |
| |
| |
| |
Varargs | |
| |
| |
Creating a Variable-Length Argument List | |
| |
| |
Iterating Over Variable-Length Argument Lists | |
| |
| |
Allowing Zero-Length Argument Lists | |
| |
| |
Specify Object Arguments Over Primitives | |
| |
| |
Avoiding Automatic Array Conversion | |
| |
| |
| |
Annotations | |
| |
| |
Using Standard Annotation Types | |
| |
| |
Annotating an Overriding Method | |
| |
| |
Annotating a Deprecated Method | |
| |
| |
Suppressing Warnings | |
| |
| |
Creating Custom Annotation Types | |
| |
| |
Annotating Annotations | |
| |
| |
Defining an Annotation Type's Target | |
| |
| |
Setting the Retention of an Annotation Type | |
| |
| |
Documenting Annotation Types | |
| |
| |
Setting Up Inheritance in Annotations | |
| |
| |
Reflecting on Annotations | |
| |
| |
| |
The for/in Statement | |
| |
| |
Ditching Iterators | |
| |
| |
Iterating over Arrays | |
| |
| |
Iterating over Collections | |
| |
| |
Avoiding Unnecessary Typecasts | |
| |
| |
Making Your Classes Work with for/in | |
| |
| |
Determining List Position and Variable Value | |
| |
| |
Removing List Items in a for/in Loop | |
| |
| |
| |
Static Imports | |
| |
| |
Importing Static Members | |
| |
| |
Using Wildcards in Static Imports | |
| |
| |
Importing Enumerated Type Values | |
| |
| |
Importing Multiple Members with the Same Name | |
| |
| |
Shadowing Static Imports | |
| |
| |
| |
Formatting | |
| |
| |
Creating a Formatter | |
| |
| |
Writing Formatted Output | |
| |
| |
Using the format() Convenience Method | |
| |
| |
Using the printf() Convenience Method | |
| |
| |
| |
Threading | |
| |
| |
Handling Uncaught Exceptions in Threads | |
| |
| |
Using Thread-Safe Collections | |
| |
| |
Using Blocking Queues | |
| |
| |
Specifying Timeouts for Blocking | |
| |
| |
Separating Thread Logic from Execution Logic | |
| |
| |
Using Executor as a Service | |
| |
| |
Using Callable Objects | |
| |
| |
Executing Tasks Without an ExecutorService | |
| |
| |
Scheduling Tasks | |
| |
| |
Advanced Synchronizing | |
| |
| |
Using Atomic Types | |
| |
| |
Locking Versus Synchronization | |
| |
| |
Index | |