You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Benedikt Ritter <br...@apache.org> on 2013/09/20 15:30:06 UTC
[LANG] isAnyBlank, isNoneBlank, isAnyEmpty, isNoneEmpty
Hi,
we have this pull request on github [1] with an accompanying jira issue [2].
I'd say it is a useful addition but I think I remember a contribution of
noneIsNull(Object... args) for Validate, that we rejected. So I wanted to
be sure about our policy here:
Do we want to add corresponding var args methods for boolean isXXX(T)
methods that model AND and OR?
Regards,
Benedikt
[1] https://github.com/apache/commons-lang/pull/3
[2] https://issues.apache.org/jira/browse/LANG-848
--
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter
Re: [LANG] isAnyBlank, isNoneBlank, isAnyEmpty, isNoneEmpty
Posted by Benedikt Ritter <be...@gmail.com>.
Hi,
Send from my mobile device
> Am 20.09.2013 um 16:40 schrieb Matt Benson <gu...@gmail.com>:
>
> Not that I'm saying we *should* do either of these things but let's
> remember that most places where one formerly would have said "support
> collections" should now be substituted "support iterables".
Nobody has expressed strong feelings against this so far. So I think we can apply this patch. Your point about Iterable is valid and should be taken into account.
Benedikt
>
> Matt
>
>
> On Fri, Sep 20, 2013 at 9:25 AM, Benedikt Ritter <be...@gmail.com>wrote:
>
>> Not sure if you're being sarcastic, but yes that would probably make sense.
>>
>>
>> 2013/9/20 James Carman <ja...@carmanconsulting.com>
>>
>>> If we're going to support varargs, we should also support collections.
>>>
>>> On Fri, Sep 20, 2013 at 10:11 AM, Benedikt Ritter <be...@gmail.com>
>>> wrote:
>>>> I guess it's just convenience...
>>>>
>>>> if( StringUtils.isAnyBlank(str1, str2, str3))
>>>>
>>>> is shorter than
>>>>
>>>> if( StringUtils.isBlank(str1) && StringUtils.isBlank(str2) &&
>>>> StringUtils.isBlank(str3) )
>>>>
>>>> Benedikt
>>>>
>>>>
>>>> 2013/9/20 James Carman <ja...@carmanconsulting.com>
>>>>
>>>>> What is the usecase for something like this? Are we more likely to
>>>>> have varargs params or a collection? Varargs *can* happen, but what
>>>>> is the more likely case?
>>>>>
>>>>> On Fri, Sep 20, 2013 at 9:30 AM, Benedikt Ritter <br...@apache.org>
>>>>> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> we have this pull request on github [1] with an accompanying jira
>>> issue
>>>>> [2].
>>>>>> I'd say it is a useful addition but I think I remember a
>> contribution
>>> of
>>>>>> noneIsNull(Object... args) for Validate, that we rejected. So I
>>> wanted to
>>>>>> be sure about our policy here:
>>>>>>
>>>>>> Do we want to add corresponding var args methods for boolean
>> isXXX(T)
>>>>>> methods that model AND and OR?
>>>>>>
>>>>>> Regards,
>>>>>> Benedikt
>>>>>>
>>>>>> [1] https://github.com/apache/commons-lang/pull/3
>>>>>> [2] https://issues.apache.org/jira/browse/LANG-848
>>>>>>
>>>>>> --
>>>>>> http://people.apache.org/~britter/
>>>>>> http://www.systemoutprintln.de/
>>>>>> http://twitter.com/BenediktRitter
>>>>>> http://github.com/britter
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>>
>>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [LANG] isAnyBlank, isNoneBlank, isAnyEmpty, isNoneEmpty
Posted by Matt Benson <gu...@gmail.com>.
Not that I'm saying we *should* do either of these things but let's
remember that most places where one formerly would have said "support
collections" should now be substituted "support iterables".
Matt
On Fri, Sep 20, 2013 at 9:25 AM, Benedikt Ritter <be...@gmail.com>wrote:
> Not sure if you're being sarcastic, but yes that would probably make sense.
>
>
> 2013/9/20 James Carman <ja...@carmanconsulting.com>
>
> > If we're going to support varargs, we should also support collections.
> >
> > On Fri, Sep 20, 2013 at 10:11 AM, Benedikt Ritter <be...@gmail.com>
> > wrote:
> > > I guess it's just convenience...
> > >
> > > if( StringUtils.isAnyBlank(str1, str2, str3))
> > >
> > > is shorter than
> > >
> > > if( StringUtils.isBlank(str1) && StringUtils.isBlank(str2) &&
> > > StringUtils.isBlank(str3) )
> > >
> > > Benedikt
> > >
> > >
> > > 2013/9/20 James Carman <ja...@carmanconsulting.com>
> > >
> > >> What is the usecase for something like this? Are we more likely to
> > >> have varargs params or a collection? Varargs *can* happen, but what
> > >> is the more likely case?
> > >>
> > >> On Fri, Sep 20, 2013 at 9:30 AM, Benedikt Ritter <br...@apache.org>
> > >> wrote:
> > >> > Hi,
> > >> >
> > >> > we have this pull request on github [1] with an accompanying jira
> > issue
> > >> [2].
> > >> > I'd say it is a useful addition but I think I remember a
> contribution
> > of
> > >> > noneIsNull(Object... args) for Validate, that we rejected. So I
> > wanted to
> > >> > be sure about our policy here:
> > >> >
> > >> > Do we want to add corresponding var args methods for boolean
> isXXX(T)
> > >> > methods that model AND and OR?
> > >> >
> > >> > Regards,
> > >> > Benedikt
> > >> >
> > >> > [1] https://github.com/apache/commons-lang/pull/3
> > >> > [2] https://issues.apache.org/jira/browse/LANG-848
> > >> >
> > >> > --
> > >> > http://people.apache.org/~britter/
> > >> > http://www.systemoutprintln.de/
> > >> > http://twitter.com/BenediktRitter
> > >> > http://github.com/britter
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > >> For additional commands, e-mail: dev-help@commons.apache.org
> > >>
> > >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>
Re: [LANG] isAnyBlank, isNoneBlank, isAnyEmpty, isNoneEmpty
Posted by Benedikt Ritter <be...@gmail.com>.
Not sure if you're being sarcastic, but yes that would probably make sense.
2013/9/20 James Carman <ja...@carmanconsulting.com>
> If we're going to support varargs, we should also support collections.
>
> On Fri, Sep 20, 2013 at 10:11 AM, Benedikt Ritter <be...@gmail.com>
> wrote:
> > I guess it's just convenience...
> >
> > if( StringUtils.isAnyBlank(str1, str2, str3))
> >
> > is shorter than
> >
> > if( StringUtils.isBlank(str1) && StringUtils.isBlank(str2) &&
> > StringUtils.isBlank(str3) )
> >
> > Benedikt
> >
> >
> > 2013/9/20 James Carman <ja...@carmanconsulting.com>
> >
> >> What is the usecase for something like this? Are we more likely to
> >> have varargs params or a collection? Varargs *can* happen, but what
> >> is the more likely case?
> >>
> >> On Fri, Sep 20, 2013 at 9:30 AM, Benedikt Ritter <br...@apache.org>
> >> wrote:
> >> > Hi,
> >> >
> >> > we have this pull request on github [1] with an accompanying jira
> issue
> >> [2].
> >> > I'd say it is a useful addition but I think I remember a contribution
> of
> >> > noneIsNull(Object... args) for Validate, that we rejected. So I
> wanted to
> >> > be sure about our policy here:
> >> >
> >> > Do we want to add corresponding var args methods for boolean isXXX(T)
> >> > methods that model AND and OR?
> >> >
> >> > Regards,
> >> > Benedikt
> >> >
> >> > [1] https://github.com/apache/commons-lang/pull/3
> >> > [2] https://issues.apache.org/jira/browse/LANG-848
> >> >
> >> > --
> >> > http://people.apache.org/~britter/
> >> > http://www.systemoutprintln.de/
> >> > http://twitter.com/BenediktRitter
> >> > http://github.com/britter
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
Re: [LANG] isAnyBlank, isNoneBlank, isAnyEmpty, isNoneEmpty
Posted by James Carman <ja...@carmanconsulting.com>.
If we're going to support varargs, we should also support collections.
On Fri, Sep 20, 2013 at 10:11 AM, Benedikt Ritter <be...@gmail.com> wrote:
> I guess it's just convenience...
>
> if( StringUtils.isAnyBlank(str1, str2, str3))
>
> is shorter than
>
> if( StringUtils.isBlank(str1) && StringUtils.isBlank(str2) &&
> StringUtils.isBlank(str3) )
>
> Benedikt
>
>
> 2013/9/20 James Carman <ja...@carmanconsulting.com>
>
>> What is the usecase for something like this? Are we more likely to
>> have varargs params or a collection? Varargs *can* happen, but what
>> is the more likely case?
>>
>> On Fri, Sep 20, 2013 at 9:30 AM, Benedikt Ritter <br...@apache.org>
>> wrote:
>> > Hi,
>> >
>> > we have this pull request on github [1] with an accompanying jira issue
>> [2].
>> > I'd say it is a useful addition but I think I remember a contribution of
>> > noneIsNull(Object... args) for Validate, that we rejected. So I wanted to
>> > be sure about our policy here:
>> >
>> > Do we want to add corresponding var args methods for boolean isXXX(T)
>> > methods that model AND and OR?
>> >
>> > Regards,
>> > Benedikt
>> >
>> > [1] https://github.com/apache/commons-lang/pull/3
>> > [2] https://issues.apache.org/jira/browse/LANG-848
>> >
>> > --
>> > http://people.apache.org/~britter/
>> > http://www.systemoutprintln.de/
>> > http://twitter.com/BenediktRitter
>> > http://github.com/britter
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [LANG] isAnyBlank, isNoneBlank, isAnyEmpty, isNoneEmpty
Posted by Benedikt Ritter <be...@gmail.com>.
I guess it's just convenience...
if( StringUtils.isAnyBlank(str1, str2, str3))
is shorter than
if( StringUtils.isBlank(str1) && StringUtils.isBlank(str2) &&
StringUtils.isBlank(str3) )
Benedikt
2013/9/20 James Carman <ja...@carmanconsulting.com>
> What is the usecase for something like this? Are we more likely to
> have varargs params or a collection? Varargs *can* happen, but what
> is the more likely case?
>
> On Fri, Sep 20, 2013 at 9:30 AM, Benedikt Ritter <br...@apache.org>
> wrote:
> > Hi,
> >
> > we have this pull request on github [1] with an accompanying jira issue
> [2].
> > I'd say it is a useful addition but I think I remember a contribution of
> > noneIsNull(Object... args) for Validate, that we rejected. So I wanted to
> > be sure about our policy here:
> >
> > Do we want to add corresponding var args methods for boolean isXXX(T)
> > methods that model AND and OR?
> >
> > Regards,
> > Benedikt
> >
> > [1] https://github.com/apache/commons-lang/pull/3
> > [2] https://issues.apache.org/jira/browse/LANG-848
> >
> > --
> > http://people.apache.org/~britter/
> > http://www.systemoutprintln.de/
> > http://twitter.com/BenediktRitter
> > http://github.com/britter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
Re: [LANG] isAnyBlank, isNoneBlank, isAnyEmpty, isNoneEmpty
Posted by James Carman <ja...@carmanconsulting.com>.
What is the usecase for something like this? Are we more likely to
have varargs params or a collection? Varargs *can* happen, but what
is the more likely case?
On Fri, Sep 20, 2013 at 9:30 AM, Benedikt Ritter <br...@apache.org> wrote:
> Hi,
>
> we have this pull request on github [1] with an accompanying jira issue [2].
> I'd say it is a useful addition but I think I remember a contribution of
> noneIsNull(Object... args) for Validate, that we rejected. So I wanted to
> be sure about our policy here:
>
> Do we want to add corresponding var args methods for boolean isXXX(T)
> methods that model AND and OR?
>
> Regards,
> Benedikt
>
> [1] https://github.com/apache/commons-lang/pull/3
> [2] https://issues.apache.org/jira/browse/LANG-848
>
> --
> http://people.apache.org/~britter/
> http://www.systemoutprintln.de/
> http://twitter.com/BenediktRitter
> http://github.com/britter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org