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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to