Examples of EnumerationIterator


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

        return value;
    }

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

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

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

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

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

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

           
        } else if (obj instanceof Object[]) {
            return new ObjectArrayIterator((Object[]) obj);
           
        } else if (obj instanceof Enumeration) {
            return new EnumerationIterator((Enumeration) obj);
           
        } else if (obj instanceof Map) {
            return ((Map) obj).values().iterator();
           
        } else if (obj instanceof Dictionary) {
            return new EnumerationIterator(((Dictionary) obj).elements());
           
        } else if (obj != null && obj.getClass().isArray()) {
            return new ArrayIterator(obj);
           
        } else {
View Full Code Here

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

     *
     * @param enumeration  the enumeration to traverse, which should not be <code>null</code>.
     * @throws NullPointerException if the enumeration parameter is <code>null</code>.
     */
    public static List toList(Enumeration enumeration) {
        return IteratorUtils.toList(new EnumerationIterator(enumeration));
    }
View Full Code Here

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

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

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

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

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

           
        } else if (obj instanceof Object[]) {
            return new ObjectArrayIterator((Object[]) obj);
           
        } else if (obj instanceof Enumeration) {
            return new EnumerationIterator((Enumeration) obj);
           
        } else if (obj instanceof Map) {
            return ((Map) obj).values().iterator();
           
        } else if (obj instanceof Dictionary) {
            return new EnumerationIterator(((Dictionary) obj).elements());
           
        } else if (obj != null && obj.getClass().isArray()) {
            return new ArrayIterator(obj);
           
        } else {
View Full Code Here

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

     *
     * @param enumeration  the enumeration to traverse, which should not be <code>null</code>.
     * @throws NullPointerException if the enumeration parameter is <code>null</code>.
     */
    public static List toList(Enumeration enumeration) {
        return IteratorUtils.toList(new EnumerationIterator(enumeration));
    }
View Full Code Here

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

            }
        }

        if ( isNotEmpty( model.getProperties() ) )
        {
            Iterator it = new EnumerationIterator( model.getProperties().keys() );
            while ( it.hasNext() )
            {
                String key = (String) it.next();
                String value = model.getProperties().getProperty( key );
                out.println( "      model.addProperty( \"" + key + "\", \"" + value + "\" );" );
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.