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.