EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql.util.iterator
Class ArrayListIterator<E>

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.util.iterator.ArrayIterator<E>
      extended by org.eclipse.persistence.jpa.jpql.util.iterator.ArrayListIterator<E>
All Implemented Interfaces:
java.lang.Iterable<E>, java.util.Iterator<E>, java.util.ListIterator<E>, IterableIterator<E>, IterableListIterator<E>

public class ArrayListIterator<E>
extends ArrayIterator<E>
implements IterableListIterator<E>

An ArrayListIterator provides a ListIterator for an array of objects.

The name might be a bit confusing: this is a ListIterator for an Array Array; not an Iterator for an ArrayList.

Version:
2.4
Since:
2.4

Constructor Summary
ArrayListIterator(T... array)
          Creates a new ArrayListIterator for the specified array.
ArrayListIterator(T[] array, int start, int length)
          Creates a new ArrayListIterator for the specified array, starting at the specified start index and continuing for the specified length.
 
Method Summary
 void add(E item)
          
 boolean hasPrevious()
          
 java.util.ListIterator<E> iterator()
          
 int nextIndex()
          
 E previous()
          
 int previousIndex()
          
 void set(E item)
          
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.util.iterator.ArrayIterator
hasNext, next, remove, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.ListIterator
hasNext, next, remove
 

Constructor Detail

ArrayListIterator

public ArrayListIterator(T... array)
Creates a new ArrayListIterator for the specified array.

Parameters:
array - The object containing the items to iterate over

ArrayListIterator

public ArrayListIterator(T[] array,
                         int start,
                         int length)
Creates a new ArrayListIterator for the specified array, starting at the specified start index and continuing for the specified length.

Parameters:
array - The object containing the items to iterate over
start - The beginning of the iteration
length - The length of the iteration
Method Detail

add

public void add(E item)

Specified by:
add in interface java.util.ListIterator<E>

hasPrevious

public boolean hasPrevious()

Specified by:
hasPrevious in interface java.util.ListIterator<E>

iterator

public java.util.ListIterator<E> iterator()

Specified by:
iterator in interface java.lang.Iterable<E>
Specified by:
iterator in interface IterableListIterator<E>
Overrides:
iterator in class ArrayIterator<E>

nextIndex

public int nextIndex()

Specified by:
nextIndex in interface java.util.ListIterator<E>

previous

public E previous()

Specified by:
previous in interface java.util.ListIterator<E>

previousIndex

public int previousIndex()

Specified by:
previousIndex in interface java.util.ListIterator<E>

set

public void set(E item)

Specified by:
set in interface java.util.ListIterator<E>

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference