Re: ObjectUtils

2013-07-04 Thread Romain Manni-Bucau
But you cant test all are null this way...maybe not that important Le 5 juil. 2013 07:15, "Dave Brosius" a écrit : > Nice. Seems like the right solution. > > On 07/04/2013 11:20 PM, Julien Aymé wrote: > >> Hi, >> >> Instead of using a predicate, wouldn't it be simpler to just use >> if (false ==

Re: ObjectUtils

2013-07-04 Thread Dave Brosius
Nice. Seems like the right solution. On 07/04/2013 11:20 PM, Julien Aymé wrote: Hi, Instead of using a predicate, wouldn't it be simpler to just use if (false == Arrays.asList(obj1, obj2, ...).contains(null)) ? Just my 2 cents, Julien 2013/7/5 Romain Manni-Bucau : Hi I'd just provide a IsNu

Re: ObjectUtils

2013-07-04 Thread Romain Manni-Bucau
Contains(null) doesnt test all values Le 5 juil. 2013 05:21, "Julien Aymé" a écrit : > Hi, > > Instead of using a predicate, wouldn't it be simpler to just use > if (false == Arrays.asList(obj1, obj2, ...).contains(null)) ? > > Just my 2 cents, > Julien > > 2013/7/5 Romain Manni-Bucau : > > Hi >

Re: ObjectUtils

2013-07-04 Thread Julien Aymé
Hi, Instead of using a predicate, wouldn't it be simpler to just use if (false == Arrays.asList(obj1, obj2, ...).contains(null)) ? Just my 2 cents, Julien 2013/7/5 Romain Manni-Bucau : > Hi > > I'd just provide a IsNullPredicate class (a singleton) and then use > commons-collection to select the

Re: [ALL] Improving Commons public relations

2013-07-04 Thread Gary Gregory
All good ideas. Gary On Jul 4, 2013, at 16:20, Benedikt Ritter wrote: > Hi, > > we had this discussion lately where we talked about attracting new > contributors for commons [1]. Over the past few days I've been thinking > about this topic again and I've come to the conclusion that there are >

Re: [ALL] Improving Commons public relations

2013-07-04 Thread Gilles
Hello. we had this discussion lately where we talked about attracting new contributors for commons [1]. Over the past few days I've been thinking about this topic again and I've come to the conclusion that there are several things we could do to improve our "public relations". Here is a list

[ALL] Improving Commons public relations

2013-07-04 Thread Benedikt Ritter
Hi, we had this discussion lately where we talked about attracting new contributors for commons [1]. Over the past few days I've been thinking about this topic again and I've come to the conclusion that there are several things we could do to improve our "public relations". Here is a list of thin

Re: ObjectUtils

2013-07-04 Thread Romain Manni-Bucau
Hi I'd just provide a IsNullPredicate class (a singleton) and then use commons-collection to select the subcollection and if size is 0 or original size (depend what you test) it would be true That said with next java version it will be quite useless IMO Le 4 juil. 2013 22:04, "Rafael Santini" a

Re: ObjectUtils

2013-07-04 Thread Rafael Santini
Hi Ted, I have some codes that needs to test whether a set of objects are all true or not. For example: if (obj1 != null && obj2 != null && obj3 != null && obj4 != null) { // Do something... } So, for readability reason, I have replaced for: if (isNotTrue(obj1, obj2, obj3, obj4) { // D

Re: Lang: ObjectUtils

2013-07-04 Thread Benedikt Ritter
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. 2013/7/4 Ted Dunning > A bigger question is why this is needed at all. > > Why not just use composition? In guava, one

[VOTE][RESULT] Release of Commons Collections 4.0-alpha1 based on RC2

2013-07-04 Thread Thomas Neidhart
On 06/30/2013 11:57 PM, Thomas Neidhart wrote: > Hi, > > I'd like to call a vote for releasing Commons Collections 4.0-alpha1 > based on RC2. > > The following changes have been applied since RC1: > > * upgrade to maven-javadoc-plugin 2.9.1 (due to CVE-2013-1571) > * fixed COLLECTIONS-474, tha

Re: Lang: ObjectUtils

2013-07-04 Thread Ted Dunning
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) { return input != null; }

Re: Lang: ObjectUtils

2013-07-04 Thread Dave Brosius
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 ObjectUtils cla

Lang: ObjectUtils

2013-07-04 Thread Rafael Santini
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)

Re: [math] Mean, Median but no Mode?

2013-07-04 Thread Phil Steitz
On 7/4/13 9:26 AM, sebb wrote: > On 4 July 2013 16:46, William Speirs wrote: >> The Frequency[1] class is what you're looking for. You can find a basic >> example of it in the user guide [2]. > Perhaps the docs should include "mode" as an example as well? > Or maybe it should be added to the Frequ

Re: [math] Mean, Median but no Mode?

2013-07-04 Thread sebb
On 4 July 2013 16:46, William Speirs wrote: > The Frequency[1] class is what you're looking for. You can find a basic > example of it in the user guide [2]. Perhaps the docs should include "mode" as an example as well? Or maybe it should be added to the Frequency class? (and StatUtils) AFAICT th