Package org.apache.commons.collections.iterators

Examples of org.apache.commons.collections.iterators.EnumerationIterator


            Map map = (Map) value;
            return map.entrySet().iterator();
           
        } else if ( value instanceof Enumeration ) {
            // if it's an enumeration, wrap it in an EnumerationIterator
            return new EnumerationIterator( (Enumeration) value );
           
        } else if ( value != null ) {
            // if we have an array return an ArrayIterator
            Class type = value.getClass();
            if ( type.isArray() ) {
View Full Code Here


/*    */
/*    */ public class EnumerationUtils
/*    */ {
/*    */   public static List toList(Enumeration enumeration)
/*    */   {
/* 50 */     return IteratorUtils.toList(new EnumerationIterator(enumeration));
/*    */   }
View Full Code Here

/*     */   public static Iterator asIterator(Enumeration enumeration)
/*     */   {
/* 697 */     if (enumeration == null) {
/* 698 */       throw new NullPointerException("Enumeration must not be null");
/*     */     }
/* 700 */     return new EnumerationIterator(enumeration);
/*     */   }
View Full Code Here

/* 713 */       throw new NullPointerException("Enumeration must not be null");
/*     */     }
/* 715 */     if (removeCollection == null) {
/* 716 */       throw new NullPointerException("Collection must not be null");
/*     */     }
/* 718 */     return new EnumerationIterator(enumeration, removeCollection);
/*     */   }
View Full Code Here

/*     */     }
/* 863 */     if ((obj instanceof Object[])) {
/* 864 */       return new ObjectArrayIterator((Object[])obj);
/*     */     }
/* 866 */     if ((obj instanceof Enumeration)) {
/* 867 */       return new EnumerationIterator((Enumeration)obj);
/*     */     }
/* 869 */     if ((obj instanceof Map)) {
/* 870 */       return ((Map)obj).values().iterator();
/*     */     }
/* 872 */     if ((obj instanceof Dictionary)) {
/* 873 */       return new EnumerationIterator(((Dictionary)obj).elements());
/*     */     }
/* 875 */     if ((obj != null) && (obj.getClass().isArray())) {
/* 876 */       return new ArrayIterator(obj);
/*     */     }
/*     */     try
View Full Code Here

        public Iterable<URL> getResources(String name) throws IOException {
            final Enumeration<URL> resources =
                getClassLoaderNotNull().getResources(name);
            //noinspection unchecked
            return new IteratorIterable<URL>(
                new EnumerationIterator(resources));
        }
View Full Code Here

        throw new UnsupportedOperationException("Read only configuration");
    }

    public Iterator getKeys()
    {
        return new EnumerationIterator(config.getInitParameterNames());
    }
View Full Code Here

        throw new UnsupportedOperationException("Read only configuration");
    }

    public Iterator getKeys()
    {
        return new EnumerationIterator(request.getParameterNames());
    }
View Full Code Here

        throw new UnsupportedOperationException("Read only configuration");
    }

    public Iterator getKeys()
    {
        return new EnumerationIterator(config.getInitParameterNames());
    }
View Full Code Here

        throw new UnsupportedOperationException("Read only configuration");
    }

    public Iterator getKeys()
    {
        return new EnumerationIterator(context.getInitParameterNames());
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.iterators.EnumerationIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.