0 15:39, Gary Gregory wrote:
> > Hi Bindul,
> >
> > Let's see what this would look like with a PR :-)
> >
> > Gary
> >
> > On Mon, Dec 28, 2020, 01:23 Bindul Bhowmik wrote:
> >
> >> Hi,
> >>
> >> I would like to propose an e
ll method myself
several times.
On 28/12/2020 15:39, Gary Gregory wrote:
Hi Bindul,
Let's see what this would look like with a PR :-)
Gary
On Mon, Dec 28, 2020, 01:23 Bindul Bhowmik wrote:
Hi,
I would like to propose an enhancement to the ObjectUtils class in lang:
Background: I hav
Hi Bindul,
Let's see what this would look like with a PR :-)
Gary
On Mon, Dec 28, 2020, 01:23 Bindul Bhowmik wrote:
> Hi,
>
> I would like to propose an enhancement to the ObjectUtils class in lang:
>
> Background: I have seen multiple places in code where we have to c
Hi,
I would like to propose an enhancement to the ObjectUtils class in lang:
Background: I have seen multiple places in code where we have to check
if a value is null before using it in a setter or other method, like:
if (valueX != null) {
bean.setValue(valueX
on for anything that has a "size()" or "length" or "length()"
> >
> > ?
> >
> > Gary
> >
> >
> > On Fri, Aug 17, 2018 at 2:43 AM Alexander Tsvetkov <
> > alexander.tsvetkov...@gmail.com> wrote:
> >
> > >
gth" or "length()"
>
> ?
>
> Gary
>
>
> On Fri, Aug 17, 2018 at 2:43 AM Alexander Tsvetkov <
> alexander.tsvetkov...@gmail.com> wrote:
>
> > Hi all,
> >
> > First of all, apologies if I have messed something up - this is my firs
gt;
> With that said, I'd like to propose adding two new methods to Commons
> Lang's ObjectUtils class:
> - isEmpty()
> - isNotEmpty()
>
> These would check whether the object is empty (or not empty respectively)
> based on its type:
> - CharSequence - Co
t;:
> >
> > > Hi all,
> > >
> > > First of all, apologies if I have messed something up - this is my
> first
> > > attempt at contributing to Apache.
> > >
> > > With that said, I'd like to propose adding two new methods to Commons
sed something up - this is my first
> > attempt at contributing to Apache.
> >
> > With that said, I'd like to propose adding two new methods to Commons
> > Lang's ObjectUtils class:
> > - isEmpty()
> > - isNotEmpty()
> >
> > These wou
at contributing to Apache.
>
> With that said, I'd like to propose adding two new methods to Commons
> Lang's ObjectUtils class:
> - isEmpty()
> - isNotEmpty()
>
> These would check whether the object is empty (or not empty respectively)
> based on its type:
&g
Hi all,
First of all, apologies if I have messed something up - this is my first
attempt at contributing to Apache.
With that said, I'd like to propose adding two new methods to Commons
Lang's ObjectUtils class:
- isEmpty()
- isNotEmpty()
These would check whether the object is
1:27 AM, Benedikt Ritter
> > wrote:
> >
> >> Hello Gary,
> >>
> >>> Am 20.10.2017 um 21:19 schrieb ggreg...@apache.org:
> >>>
> >>> Repository: commons-lang
> >>> Updated Branches:
> >>> refs/heads/master 88654b79c -&g
Thanks Benedikt!
Gary
On Sat, Oct 21, 2017 at 9:33 AM, wrote:
> Repository: commons-lang
> Updated Branches:
> refs/heads/master be3638eb4 -> 6276d0f84
>
>
> Remove ObjectUtils' trailing white spaces
>
> Commit 6ea2fc8 inadvertently introduced trailing whi
ommons-lang
>>> Updated Branches:
>>> refs/heads/master 88654b79c -> 6ea2fc8d3
>>>
>>>
>>> [LANG-1360] Add methods to ObjectUtils to get various forms of class
>>> names in a null-safe manner
>>
>> I think this belongs to Cl
itter
wrote:
> Hello Gary,
>
> > Am 20.10.2017 um 21:19 schrieb ggreg...@apache.org:
> >
> > Repository: commons-lang
> > Updated Branches:
> > refs/heads/master 88654b79c -> 6ea2fc8d3
> >
> >
> > [LANG-1360] Add methods to ObjectUtils to ge
Hello Gary,
> Am 20.10.2017 um 21:19 schrieb ggreg...@apache.org:
>
> Repository: commons-lang
> Updated Branches:
> refs/heads/master 88654b79c -> 6ea2fc8d3
>
>
> [LANG-1360] Add methods to ObjectUtils to get various forms of class
> names in a null-safe m
ode that I'm refactoring. In
> general, I need to check few objects.
>
> I'm worry about readability. So, I think that isNotNull(obj1, obj2, obj3,
> obj4) is more clear and is so readable like String.isNotBlank() that I use
> a lot.
>
>
> Rafael Santini
>
> -
obj2, obj3,
obj4) is more clear and is so readable like String.isNotBlank() that I use a
lot.
Rafael Santini
-Mensagem Original-
From: Matt Benson
Sent: Monday, July 08, 2013 2:16 PM
To: Commons Developers List
Subject: Re: ObjectUtils
I don't know exactly why this thread is
s.firstNonNull() returns the first object that is not null
> (equivalent to something that returns true if there is at least one object
> that is not null). The isNotNull() returns true if all objects are not null.
>
> Rafael Santini
>
> -Mensagem Original----- From
ll() returns true if all objects are not null.
Rafael Santini
-Mensagem Original-
From: Matt Benson
Sent: Monday, July 08, 2013 1:20 PM
To: Commons Developers List
Subject: Re: Lang: ObjectUtils
WRT #firstNonNull, I don't know why I couldn't find it before. I do now,
and I ag
WRT #firstNonNull, I don't know why I couldn't find it before. I do now,
and I agree it would seem to fit better in ArrayUtils.
Matt
On Mon, Jul 8, 2013 at 10:04 AM, Jörg Schaible
wrote:
> Hi Matt,
>
> Matt Benson wrote:
>
> > On Mon, Jul 8, 2013 at 8:22 AM, Jörg Schaible
> > wrote:
> >
> >> H
Hi Matt,
Matt Benson wrote:
> On Mon, Jul 8, 2013 at 8:22 AM, Jörg Schaible
> wrote:
>
>> Hi Hen,
>>
>> Henri Yandell wrote:
>>
>> > I don't see any value having the first two methods - replacing the '=='
>> > sign is a bit too far in the 'provide simple methods' direction I think
>> :)
>> >
>>
contains(array, null) is fine.
Matt
>
> > Having a containsNull is semantically nice, but I'm not sure it's needed.
>
> The question is here more, why the method is part of ObjectUtils, since it
> operates on an Array and I did not find it immediately (and I am pr
.contains(array, null);
Well, no, this is not, what the method does! With Lang we could use now:
ObjectUtils.firstNotNull(array) != null
> Having a containsNull is semantically nice, but I'm not sure it's needed.
The question is here more, why the method is part of ObjectUti
ly nice, but I'm not sure it's needed.
Hen
On Thu, Jul 4, 2013 at 11:43 AM, Rafael Santini wrote:
> Hi,
>
> I would like to propose a method in ObjectUtils class that receives an
> array of objects and returns true if all objects are not null. I have
> implemented the
On 4 July 2013 19:43, Rafael Santini wrote:
> Hi,
>
> I would like to propose a method in ObjectUtils class that receives an array
> of objects and returns true if all objects are not null. I have implemented
> the following:
>
> public static boolean isNull(Object object)
Benedikt Ritter wrote:
> You could do this with with CollectionsUtils from [Collections].
> But I think we all agree that implementing a Predicate inline is a lot
> more verbose than the proposed method.
+1
We have traditionally such convenience methods in lang.
When I look at the current argum
> > >
> > > I'd say both are not true.
> > >
> > > I'm not sure the library should promote that the above is the case.
> > >
> > >
> > >
> > > On 07/04/2013 02:43 PM, Rafael Santini wrote:
> > >
obj4) {
>>>> // Do something...
>>>> }
>>>>
>>>> So I would like something like the isNotNull(Object... objects) method
>>>> in
>>>> Commons Lang instead of maintain this method in my own framework.
>>>>
>>&g
o: Commons Developers List
Subject: Re: Lang: ObjectUtils
A bigger question is why this is needed at all.
Why not just use composition? In guava, one would do this:
Iterables.all(Arrays.asList(**foo), new Predicate() {
@Override
public boolean apply(Double i
> if (isNotTrue(obj1, obj2, obj3, obj4) {
> >>// Do something...
> >> }
> >>
> >> So I would like something like the isNotNull(Object... objects) method
> in
> >> Commons Lang instead of maintain this method in my own framework.
> >>
> >
t;
>> Thanks,
>>
>> Rafael Santini
>>
>> -Mensagem Original- From: Ted Dunning
>> Sent: Thursday, July 04, 2013 4:34 PM
>> To: Commons Developers List
>> Subject: Re: Lang: ObjectUtils
>>
>> A bigger question is why this is needed at all.
,
>
> Rafael Santini
>
> -Mensagem Original- From: Ted Dunning
> Sent: Thursday, July 04, 2013 4:34 PM
> To: Commons Developers List
> Subject: Re: Lang: ObjectUtils
>
> A bigger question is why this is needed at all.
>
> Why not just use composition? In guav
Commons Developers List
Subject: Re: Lang: ObjectUtils
A bigger question is why this is needed at all.
Why not just use composition? In guava, one would do this:
Iterables.all(Arrays.asList(foo), new Predicate() {
@Override
public boolean apply(Double input) {
t;
> > I'm not sure the library should promote that the above is the case.
> >
> >
> >
> > On 07/04/2013 02:43 PM, Rafael Santini wrote:
> >
> >> Hi,
> >>
> >> I would like to propose a method in ObjectUtils class t
sure the library should promote that the above is the case.
>
>
>
> On 07/04/2013 02:43 PM, Rafael Santini wrote:
>
>> Hi,
>>
>> I would like to propose a method in ObjectUtils class that receives an
>> array of objects and returns true if all objects are not n
This implies that having arrays with some null elements is
a) somewhat common
2) a good idea
I'd say both are not true.
I'm not sure the library should promote that the above is the case.
On 07/04/2013 02:43 PM, Rafael Santini wrote:
Hi,
I would like to propose a method in O
Hi,
I would like to propose a method in ObjectUtils class that receives an array
of objects and returns true if all objects are not null. I have implemented
the following:
public static boolean isNull(Object object) {
return object == null;
}
public static boolean isNotNull(Object object
38 matches
Mail list logo