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. Jakarta 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, Jakarta 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.
Get Jakarta Commons Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.