Package org.apache.commons.collections.iterators

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


            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

           
        } 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

   
    /**
     * Version of {@link #extractEntryList(Iterator)} which takes an Enumeration instead
     */
    public static List extractEntryList(Enumeration en) {
        return extractEntryList(new EnumerationIterator(en));
    }
View Full Code Here

            }
        }

        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

        }
    }

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

        return handleDelimiters(config.getInitParameter(key));
    }

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

        return handleDelimiters(context.getInitParameter(key));
    }

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

        return handleDelimiters(config.getInitParameter(key));
    }

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

        }
        else if(obj instanceof Object[]) {
            return new ArrayIterator( obj );
        }
        else if(obj instanceof Enumeration) {
            return new EnumerationIterator( (Enumeration)obj );
        }
        else if(obj instanceof Map) {
            return ((Map)obj).values().iterator();
        }
        else if(obj != null && obj.getClass().isArray()) {
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.