Patched the select(inputCollection, predicate, outputCollection) method so that it does not return a variable, to avoid any confusion with the select(inputCollection, predicate) method which returns the outputCollection.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130486 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a36442f0d0
commit
2ecede5902
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/CollectionUtils.java,v 1.3 2001/05/06 11:04:25 jstrachan Exp $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2001/05/06 11:04:25 $
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/CollectionUtils.java,v 1.4 2001/05/22 15:53:06 jstrachan Exp $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2001/05/22 15:53:06 $
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
|
@ -76,7 +76,7 @@ import java.util.Set;
|
|||
*
|
||||
* @author Rodney Waldhoff
|
||||
*
|
||||
* @version $Id: CollectionUtils.java,v 1.3 2001/05/06 11:04:25 jstrachan Exp $
|
||||
* @version $Id: CollectionUtils.java,v 1.4 2001/05/22 15:53:06 jstrachan Exp $
|
||||
*/
|
||||
public class CollectionUtils {
|
||||
/**
|
||||
|
@ -325,10 +325,8 @@ public class CollectionUtils {
|
|||
|
||||
/** Selects all elements from inputCollection which match the given predicate
|
||||
* and adds them to outputCollection
|
||||
*
|
||||
* @return the outputCollection
|
||||
*/
|
||||
public static Collection select( Collection inputCollection, Predicate predicate, Collection outputCollection ) {
|
||||
public static void select( Collection inputCollection, Predicate predicate, Collection outputCollection ) {
|
||||
if ( inputCollection != null && predicate != null ) {
|
||||
for ( Iterator iter = inputCollection.iterator(); iter.hasNext(); ) {
|
||||
Object item = iter.next();
|
||||
|
@ -337,7 +335,6 @@ public class CollectionUtils {
|
|||
}
|
||||
}
|
||||
}
|
||||
return outputCollection;
|
||||
}
|
||||
|
||||
/** Transforms all elements from inputCollection with the given transformer
|
||||
|
|
Loading…
Reference in New Issue