commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject RE: [lang] Proposal (2): isEmpty
Date Sat, 19 Jul 2003 19:42:45 GMT

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:scolebourne@btopenworld.com]
> > 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: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message