Common Java Cookbook

Edition: 0.19

Download PDF or Read on Scribd

Download Examples (ZIP)

Chapter 1. Supplements to the Java 2 Platform

1.1. Introduction

This chapter introduces utilities that augment the Java 2 Standard Edition (J2SE), providing classes and utilities that make some of the more mundane programming tasks more straightforward. Commons Lang is a collection of useful supplements to the J2SE. This package fills gaps present in the standard Java API and provides a number of simple, time-saving utility classes. Sun's Javadoc for the java.lang package in the J2SE states that the package "provides classes that are fundamental to the design of the Java programming language." In the same vein, Commons Lang provides classes that augment the fundamental design of the Java programming language.

You may be tempted to skip the simple recipes presented in this chapter and continue on to more advanced topics in this text. String manipulation, date truncation, and toString( ) methods do not inspire the sense of mystery and genius one feels when working with Extensible Markup Language (XML) or an open source text-to-speech engine. But, even if you are the most fluent speaker of Java, there are lessons to be learned from the utilities introduced in this chapter; a simple trick learned here may save you a few minutes every single day. Don't waste your time rewriting and maintaining utilities that already exist in Commons Lang; there are more interesting problems to be solved, and building hashcode() functions is not one of them.


Creative Commons License
Common Java Cookbook by Tim O'Brien is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License.
Permissions beyond the scope of this license may be available at http://www.discursive.com/books/cjcook/reference/jakartackbk-PREFACE-1.html. Copyright 2009. Common Java Cookbook Chunked HTML Output. Some Rights Reserved.