You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Pascal Schumacher <pa...@gmx.net> on 2017/02/12 17:12:46 UTC

Add StringUtils#isAllEmpty(CharSequence...) and isAllBlank(CharSequence...)?

Hello everybody,

a few months ago StringUtils#isAnyNotEmpty(CharSequence...) and 
StringUtils#isAnyNotBlank(CharSequence...) were added 
(https://issues.apache.org/jira/browse/LANG-1270).

Now there is a pull request which purposes adding the inverse of these 
methods named isAllEmpty(CharSequence...) and 
isAllBlank(CharSequence...) 
(https://github.com/apache/commons-lang/pull/221)

Duncan Jones commented on the pull request: "I don't think we should add 
methods that are simply the inverse of another method."

On the other hand similar method "pairs" already exist: 
isEmpty/isNotEmpty, isBlank/isNotBlank, isAnyEmpty/isNoneEmpty, 
containsAny/containsNone

What do you think, should we add these methods?

-Pascal




Re: Add StringUtils#isAllEmpty(CharSequence...) and isAllBlank(CharSequence...)?

Posted by "Bruno P. Kinoshita" <br...@yahoo.com.br.INVALID>.
Hello,

I'm 0 on that one. Agree that users can simply use the negation operator, and also that it can be handy to have a method to avoid typos or simplify their code.


Cheers
Bruno



----- Original Message -----
From: Pascal Schumacher <pa...@gmx.net>
To: Commons Developers List <de...@commons.apache.org>
Sent: Monday, 13 February 2017 6:12 AM
Subject: Add StringUtils#isAllEmpty(CharSequence...) and isAllBlank(CharSequence...)?

Hello everybody,

a few months ago StringUtils#isAnyNotEmpty(CharSequence...) and 
StringUtils#isAnyNotBlank(CharSequence...) were added 
(https://issues.apache.org/jira/browse/LANG-1270).

Now there is a pull request which purposes adding the inverse of these 
methods named isAllEmpty(CharSequence...) and 
isAllBlank(CharSequence...) 
(https://github.com/apache/commons-lang/pull/221)

Duncan Jones commented on the pull request: "I don't think we should add 
methods that are simply the inverse of another method."

On the other hand similar method "pairs" already exist: 
isEmpty/isNotEmpty, isBlank/isNotBlank, isAnyEmpty/isNoneEmpty, 
containsAny/containsNone

What do you think, should we add these methods?

-Pascal

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