I think I prefer [was it Gary's?] the idea of having StringUtils being usable as an instance in which you setup general strategies to overloading with a boolean variable. No insult intended, but that always seems like a confusing hack to me.
Hen On Sat, 19 Jul 2003, Laird J. Nelson wrote: > > -----Original Message----- > > From: Stephen Colebourne [mailto:[EMAIL PROTECTED] > > It isn't. My preference is now for > > > > isEmpty() - "" or null > > isBlank() - whitespace only, "" or null > > and maybe: > > isEmptyTrimmed() - trim() then "" or null > > > > (plus isNotEmpty, isNotBlank, isEmptyNN, isBlankNN) > > Delurking for a moment, but why not have an extra parameter? > > Something like: isEmpty(String, boolean) where the boolean indicates > whether trim() should be performed or not? Then isEmpty(String) could > default to calling it with false as the second parameter. > > See, for example, > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/foundry/foundry/foundry/t > ext/Strings.java?rev=1.13&content-type=text/vnd.viewcvs-markup (the > isEmptyOrNull(Object, boolean)) method. > > Cheers, > Laird > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
