Deprecate getIterator

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130785 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2002-08-17 11:38:35 +00:00
parent ed1a9d333d
commit babbe098f8
1 changed files with 13 additions and 6 deletions

View File

@ -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.11 2002/08/15 20:04:31 pjack Exp $ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/CollectionUtils.java,v 1.12 2002/08/17 11:38:35 scolebourne Exp $
* $Revision: 1.11 $ * $Revision: 1.12 $
* $Date: 2002/08/15 20:04:31 $ * $Date: 2002/08/17 11:38:35 $
* *
* ==================================================================== * ====================================================================
* *
@ -72,13 +72,16 @@ import java.util.Map;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
import java.util.Set; import java.util.Set;
import org.apache.commons.collections.iterators.ArrayIterator;
import org.apache.commons.collections.iterators.EnumerationIterator;
/** /**
* A set of {@link Collection} related utility methods. * A set of {@link Collection} related utility methods.
* *
* @author Rodney Waldhoff * @author Rodney Waldhoff
* *
* @since 1.0 * @since 1.0
* @version $Id: CollectionUtils.java,v 1.11 2002/08/15 20:04:31 pjack Exp $ * @version $Id: CollectionUtils.java,v 1.12 2002/08/17 11:38:35 scolebourne Exp $
*/ */
public class CollectionUtils { public class CollectionUtils {
@ -510,8 +513,12 @@ public class CollectionUtils {
return iterator; return iterator;
} }
/** Returns an Iterator for the given object. Currently this method can handle /**
* Iterator, Enumeration, Collection, Map, Object[] or array */ * Returns an Iterator for the given object. Currently this method can handle
* Iterator, Enumeration, Collection, Map, Object[] or array.
*
* @deprecated use IteratorUtils version instead
*/
public static Iterator getIterator(Object obj) { public static Iterator getIterator(Object obj) {
if(obj instanceof Iterator) { if(obj instanceof Iterator) {
return (Iterator)obj; return (Iterator)obj;