commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guy Rouillier <>
Subject ArrayList nullIfEmpty
Date Fri, 28 Aug 2009 01:48:43 GMT
I'm new to this list.  I searched the archives and could not find the 
subject method discussed.  Has it ever been proposed?  StringUtils has 
defaultIfEmpty, and ObjectUtils has defaultIfNull, but ObjectUtils 
doesn't have anything similar.  Since ArrayUtils already has all the 
necessary isEmtpy methods defined, the following would appear to be 

public static <T> T[] nullIfEmpty(T[] array) {


Guy Rouillier

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message