Modern Java Community Infrastructure

Does anyone know of good general Java frameworks that have common but tedious utilities that do things like ...

ObjectUtil.equalsOrBothNull(obj1,obj2) FormatUtil.formatName(String firstName String middleName, String lastName) AddressUtil.formatAddress(address) 

etc...

It seems that I always end up revising these classes. Guava libraries are the closest I have found.

http://code.google.com/p/guava-libraries/

+4
source share
2 answers

Commons Lang contains many utilities that can help you. I use this library in most of my projects. This page provides a basic overview of the various classes. StringUtils is the one I use the most, but many of the others have been useful once or twice. ObjectUtils has the null safe equals method you are looking for.

+6
source

You may also find hamcrest useful.

http://code.google.com/p/hamcrest/

Here is a tutorial: http://code.google.com/p/hamcrest/wiki/Tutorial

+4
source

All Articles