commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1126006 - /incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/EnumerationIterator.java
Date Sun, 22 May 2011 15:53:18 GMT
Author: simonetripodi
Date: Sun May 22 15:53:18 2011
New Revision: 1126006

URL: http://svn.apache.org/viewvc?rev=1126006&view=rev
Log:
added static method to create automatically an Iterator<E> from an Enumeration<E>

Modified:
    incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/EnumerationIterator.java

Modified: incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/EnumerationIterator.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/EnumerationIterator.java?rev=1126006&r1=1126005&r2=1126006&view=diff
==============================================================================
--- incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/EnumerationIterator.java (original)
+++ incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/EnumerationIterator.java Sun
May 22 15:53:18 2011
@@ -32,6 +32,11 @@ public class EnumerationIterator<E>
     implements Iterator<E>
 {
 
+    public static <T> Iterator<T> newIterator( Enumeration<T> e )
+    {
+        return new EnumerationIterator<T>( e );
+    }
+
     private final Enumeration<E> e;
 
     public EnumerationIterator( Enumeration<E> e )



Mime
View raw message