开发者

A modern Java commons framework

开发者 https://www.devze.com 2022-12-17 09:47 出处:网络
Does anybody know of a good common frameworks for Java that has common but tedious utility methods that do things like...

Does anybody know of a good common frameworks for Java that has common but tedious utility methods that do things like...

ObjectUtil.equalsOrBothNull(obj1,obj2)

FormatUtil.formatName(String firstName String middleName, String lastName) 

AddressUtil.formatAddress(address)

etc...

It seems like I always end up re-implementing these sorts of classes. Guava-libraries is t开发者_高级运维he closest thing I have found.

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


Commons Lang has a lot of utilities that you might find helpful. I use that library in most of my projects. This page has a basic overview of the different classes. StringUtils is the one that I use most, but many of the others have been handy once or twice. ObjectUtils has the null-safe equals method you're looking for.


You may also find hamcrest useful.

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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消