On Wed, 16 May 2001, Waldhoff, Rodney wrote:

> Does anyone have any strong objections to removing this class from the
> Collections distribution?  CollectionUtils is similar in spirit but
> different in semantics, and I think all of this functionality could be build
> from addAll/removeAll/retainAll methods in the Collection interface.
> 

I'm OK for deprecating if CollectionUtils can do everything and more.  But
removing seems a little abrupt (even though technically we haven't done a
1.0 release yet).  How about recasting the functionality in terms of calls
to the corresponding CollectionUtils methods?

Craig


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 16, 2001 5:19 PM
> To: [EMAIL PROTECTED]
> Subject: cvs commit:
> jakarta-commons/collections/src/java/org/apache/commons/collections
> ListUtils.java
> 
> 
> rwaldhoff    01/05/16 15:19:27
> 
>   Modified:    collections/src/java/org/apache/commons/collections
>                         ListUtils.java
>   Log:
>   Deprecating.  I'd like to remove this class, if no one has any issues.
>   
>   Revision  Changes    Path
>   1.2       +12 -11
> jakarta-commons/collections/src/java/org/apache/commons/collections/ListUtil
> s.java
>   
>   Index: ListUtils.java
>   ===================================================================
>   RCS file:
> /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collection
> s/ListUtils.java,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- ListUtils.java  2001/04/22 19:56:37     1.1
>   +++ ListUtils.java  2001/05/16 22:19:23     1.2
>   @@ -16,19 +16,20 @@
>     *
>     * @author  <a href="mailto:[EMAIL PROTECTED]";>Federico Barbieri</a>
>     * @author  <a href="mailto:[EMAIL PROTECTED]";>Peter Donald</a>
>   + * @deprecated See {@link
> org.apache.commons.collections.CollectionUtils}.
>     */
>    public class ListUtils
>    {
>   -    public static List intersection( final List list1, final List list2 )
> 
>   +    public static List intersection( final List list1, final List list2 )
>        {
>            final ArrayList result = new ArrayList();
>            final Iterator iterator = list2.iterator();
>    
>   -        while( iterator.hasNext() ) 
>   +        while( iterator.hasNext() )
>            {
>                final Object o = iterator.next();
>    
>   -            if ( list1.contains( o ) ) 
>   +            if ( list1.contains( o ) )
>                {
>                    result.add( o );
>                }
>   @@ -36,27 +37,27 @@
>    
>            return result;
>        }
>   -    
>   -    public static List subtract( final List list1, final List list2 ) 
>   +
>   +    public static List subtract( final List list1, final List list2 )
>        {
>            final ArrayList result = new ArrayList( list1 );
>            final Iterator iterator = list2.iterator();
>    
>   -        while( iterator.hasNext() ) 
>   +        while( iterator.hasNext() )
>            {
>                result.remove( iterator.next() );
>            }
>    
>            return result;
>        }
>   -    
>   -    public static List sum( final List list1, final List list2 ) 
>   +
>   +    public static List sum( final List list1, final List list2 )
>        {
>   -        return subtract( union( list1, list2 ), 
>   +        return subtract( union( list1, list2 ),
>                             intersection( list1, list2 ) );
>        }
>   -    
>   -    public static List union( final List list1, final List list2 ) 
>   +
>   +    public static List union( final List list1, final List list2 )
>        {
>            final ArrayList result = new ArrayList( list1 );
>            result.addAll( list2 );
>   
>   
>   
> 

Reply via email to