Package org.apache.commons.collections.iterators

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


    public class LuceneResultIterator extends WGAbstractResultSetIterator<ScoreDoc> {
       
        private int _resultCount = 0;

        public LuceneResultIterator() {
            super(new ArrayIterator(_hits.scoreDocs));
        }
View Full Code Here


     * returns an iterator on all the enumerated instaces.
     * @return iterator
     */
    public static Iterator iterator()
    {
        return new ArrayIterator(ALL);
    }
View Full Code Here

        for (int i = 0; i < keys.length; i++)
        {
            keys[i] = paramsInfo[i][0];
        }

        return new ArrayIterator(keys);
    }
View Full Code Here

     * @param to  the index to finish iterating at.
     * @return
     */
    @SuppressWarnings("unchecked")
    public static <T> Iterator<T> arrayIterator(T[] values, int from, int to) {
        return new ArrayIterator(values, from, to);
    }
View Full Code Here

        }
        else if(obj instanceof Collection) {
            return ((Collection)obj).iterator();
        }
        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()) {
            return new ArrayIterator( obj );
        }
        else{
            return null;
        }
    }
View Full Code Here

     * @return  an iterator over the array
     * @throws NullPointerException if array is null
     * @deprecated Use <code>new ArrayIterator(array)</code>
     */
    public static Iterator arrayIterator(Object[] array) {
        return new ArrayIterator(array);
    }
View Full Code Here

     * @throws IllegalArgumentException if array bounds are invalid
     * @throws NullPointerException if array is null
     * @deprecated Use <code>new ArrayIterator(array,start)</code>
     */
    public static Iterator arrayIterator(Object[] array, int start) {
        return new ArrayIterator(array, start);
    }
View Full Code Here

     * @throws IllegalArgumentException if array bounds are invalid
     * @throws NullPointerException if array is null
     * @deprecated Use <code>new ArrayIterator(array,start,end)</code>
     */
    public static Iterator arrayIterator(Object[] array, int start, int end) {
        return new ArrayIterator(array, start, end);
    }
View Full Code Here

           
        } else if (obj instanceof Collection) {
            return ((Collection) obj).iterator();
           
        } 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 instanceof Dictionary) {
            return new EnumerationIterator(((Dictionary) obj).elements());
           
        } else if (obj != null && obj.getClass().isArray()) {
            return new ArrayIterator(obj);
           
        } else {
            try {
                Method method = obj.getClass().getMethod("iterator", null);
                if (Iterator.class.isAssignableFrom(method.getReturnType())) {
View Full Code Here

      }

        // Get Field descriptors FieldDescriptor
        if (cld.getFieldDescriptions() != null)
        {
            it = new ArrayIterator(cld.getFieldDescriptions());
            while (it.hasNext())
            {
                FieldDescriptor fieldDesc = (FieldDescriptor)it.next();
                newChildren.add(new OjbMetaFieldDescriptorNode(
                        this.getOjbMetaTreeModel().getRepository(),
View Full Code Here

TOP

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

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.