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 sufficient:

public static <T> T[] nullIfEmpty(T[] array) {
  return(isEmpty(array));
}

Thanks.

--
Guy Rouillier

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to