Class ArrayAdapter.ObjectArrayIterator<E>
java.lang.Object
org.datanucleus.store.types.containers.ArrayAdapter.ObjectArrayIterator<E>
- All Implemented Interfaces:
Iterator<E>
- Enclosing class:
ArrayAdapter<C>
Based on Apache Collections 3.2 implementation. Specific implementation for Object arrays which will perform better.
-
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 TypeMethodDescriptionboolean
hasNext()
Returns true if there are more elements to return from the array.next()
Returns the next element in the array.void
remove()
ThrowsUnsupportedOperationException
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.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
- ifarray
isnull
-
-
Method Details
-
hasNext
public boolean hasNext()Returns true if there are more elements to return from the array. -
next
Returns the next element in the array.- Specified by:
next
in 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:
remove
in interfaceIterator<E>
- Throws:
UnsupportedOperationException
- always
-