commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lavandowska <flanandow...@yahoo.com>
Subject Re: [lang] Proposal (2): isEmpty
Date Sat, 19 Jul 2003 01:07:26 GMT
I could live with #1, though I'd rather the current contract (the
trim() functionality) didn't change (whine whine whine).

Or #2 is fine also, but I'd suggest another name (StringTests connotes
Unit tests to me), maybe StringChecks or CheckString?

Lance

--- Stephen Colebourne <scolebourne@btopenworld.com> wrote:
> Proposal for methods:
> 
> - isEmpty() - true for "" or null
> - isNotEmpty() - opposite
> - isEmptyNN() - true for ""
> 
> - isBlank() - trims - true for "  ", "" or null
> - isNotBlank() - opposite
> - isBlankNN() - trims - true for "  " or ""
> 
> - isWhitespace() - true for all whitespace, "" or null
> - isNotWhitespace() - opposite
> - isWhitespaceNN() - true for all whitespace or ""
> 
> Where NN means NotNull.
> This covers all the cases, and takes the working premise that more
> people want null to be true than false.
> 
> 
> Proposal for location:
> 1) In StringUtils. Incompatable change to isEmpty() (no longer trims)
> and
> isWhitespace() (null now true).
> 
> 2) In StringTests (new class). Deprecate StringUtils
> isEmpty/isNotEmpty.


=====
Lance Lavandowska
Http://www.brainopolis.com/

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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