Utility classes for Java CodeThis project is a collection of utility classes for Java programmers. These classes supplement the classes found in java.util and in the JDK collections classes. This document presents the highlights of the util classes and also provides information on checking out the code.
The complete API documentation can be found at http://www.mozilla.org/projects/blackwood/java-util/api/.
One thing sorely lacking in Java is an assertion facility. This
class provides a robust, complete, assertion facility.
The best way to use the Assert class is:
if (Assert.enabled && Assert.assert_it(mytest(), "my test failed"));
Such usage prevents not only mytest() from being executed if assertions are disabled but also the assert method itself, and some compilers can remove the entire statement if assertions are disabled.
ParameterCheck provides convenient means for parameter checking. Class
methods in the ParameterCheck class can be used to verify that method
parameters meet certain conditions and to raise exceptions if the
conditions are not met.
This verifies that myParameter is not null, throwing an IllegalArgumentException if it is.
Downloading the Jar
Version 1.0 of the mozilla util jar file is available here.
Checking out the code
Right now there is no module for just the java-util code, you must check out the whole blackwood tree, which includes java-util. It can be found at http://www.mozilla.org/cvs.html, but instead of cvs checkout SeaMonkeyAll use cvs checkout Blackwood
Ed Burns Last modified: Tue Dec 18 12:28:53 PST 2001