Package org.apache.commons.collections.iterators

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


  public Iterator<String> iterator() {
    if (value != null) {
      return new SingletonIterator(value);
    }
    if (values != null) {
      return new ObjectArrayIterator(values);
    }
    return EmptyIterator.INSTANCE;
  }
View Full Code Here


  public Iterator<String> iterator() {
    if (value != null) {
      return new SingletonIterator(value);
    }
    if (values != null) {
      return new ObjectArrayIterator(values);
    }
    return EmptyIterator.INSTANCE;
  }
View Full Code Here

     * @param array  the array over which to iterate
     * @return  an iterator over the array
     * @throws NullPointerException if array is null
     */
    public static ResettableIterator arrayIterator(Object[] array) {
        return new ObjectArrayIterator(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 ObjectArrayIterator(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 ObjectArrayIterator(array, start, end);
    }
View Full Code Here

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

     * @param array  the array over which to iterate
     * @return  an iterator over the array
     * @throws NullPointerException if array is null
     */
    public static ResettableIterator arrayIterator(Object[] array) {
        return new ObjectArrayIterator(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 ObjectArrayIterator(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 ObjectArrayIterator(array, start, end);
    }
View Full Code Here

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

TOP

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

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.