Class ArrayAdapter.ObjectArrayIterator<E>
java.lang.Object
org.datanucleus.store.types.containers.ArrayAdapter.ObjectArrayIterator<E>
- All Implemented Interfaces:
Iterator<E>
- Enclosing class:
ArrayAdapter<C>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionObjectArrayIterator(E[] array) Constructs an ObjectArrayIterator that will iterate over the values in the specified array. -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()Returns true if there are more elements to return from the array.next()Returns the next element in the array.voidremove()ThrowsUnsupportedOperationException.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining
-
Field Details
-
array
-
endIndex
protected int endIndexThe end index to loop to -
index
protected int indexThe current iterator index
-
-
Constructor Details
-
ObjectArrayIterator
Constructs an ObjectArrayIterator that will iterate over the values in the specified array.- Parameters:
array- the array to iterate over- Throws:
NullPointerException- ifarrayisnull
-
-
Method Details
-
hasNext
-
next
Returns the next element in the array.- Specified by:
nextin interfaceIterator<E>- Returns:
- the next element in the array
- Throws:
NoSuchElementException- if all the elements in the array have already been returned
-
remove
public void remove()ThrowsUnsupportedOperationException.- Specified by:
removein interfaceIterator<E>- Throws:
UnsupportedOperationException- always
-