Package org.apache.commons.collections.iterators

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


                sb.append("empty");
            }
            else
            {
                sb.append('[');
                for (Iterator it = new ArrayIterator(params); it.hasNext(); )
                {
                    sb.append(it.next());
                    if (it.hasNext())
                    {
                        sb.append(", ");
                    }
                }
                sb.append(']');
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

     * @return  an iterator over the array
     * @throws IllegalArgumentException if the array is not an array
     * @throws NullPointerException if array is null
     */
    public static ResettableIterator arrayIterator(Object array) {
        return new ArrayIterator(array);
    }
View Full Code Here

     * @throws IndexOutOfBoundsException if start is less than zero or greater
     *  than the length of the array
     * @throws NullPointerException if array is null
     */
    public static ResettableIterator arrayIterator(Object array, int start) {
        return new ArrayIterator(array, start);
    }
View Full Code Here

     * @throws IndexOutOfBoundsException if array bounds are invalid
     * @throws IllegalArgumentException if end is before start
     * @throws NullPointerException if array is null
     */
    public static ResettableIterator arrayIterator(Object array, int start, int end) {
        return new ArrayIterator(array, start, end);
    }
View Full Code Here

           
        } 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", (Class[]) null);
                if (Iterator.class.isAssignableFrom(method.getReturnType())) {
View Full Code Here

                {
                    userColIterator = ((Collection) userCol).iterator();
                }
                else if (type.isArray())
                {
                    userColIterator = new ArrayIterator(userCol);
                }
                else
                {
                    throw new OJBRuntimeException(
                        userCol.getClass()
View Full Code Here

                {
                    colIterator = ((Collection) col).iterator();
                }
                else if (type.isArray())
                {
                    colIterator = new ArrayIterator(col);
                }
                else
                {
                    continue;
                }
View Full Code Here

                    {
                        colIterator = ((Collection) col).iterator();
                    }
                    else if (type.isArray())
                    {
                        colIterator = new ArrayIterator(col);
                    }
                    else
                    {
                        continue;
                    }
View Full Code Here

            LogSearchCriteria criteria = (LogSearchCriteria) session
                    .getAttribute(IConst.SESSION.SEARCH_CRITERIA_LOG);
            int block = Integer.parseInt(lForm.getBlock());
            dao.fillLogEntryList(criteria, records, block);
            request.setAttribute(IConst.REQUEST.RECORDS_DATA, records);
            ArrayIterator it = new ArrayIterator();
            it.setArray(JGossipLog.PRIORITIES);
            request.setAttribute("log_level", it);
        } catch (SQLException sqle) {
            getServlet().log("Connection.process", sqle);
            throw new SystemException(sqle);
        } catch (InstantiationException e) {
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.