public class ArrayIterator
extends java.lang.Object
implements java.util.Iterator
Title: Framework Support Library
Description: Converts an array to an iterator.
Copyright: Copyright (c) 2009
Company: StreamScape Technologies
Constructor and Description |
---|
ArrayIterator(java.lang.Object[] array) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Tests if this Iterator contains more elements.
|
java.lang.Object |
next()
Returns the next element of this
Iterator if it has at least one more element to provide. |
void |
remove()
Removes the last object from the array by setting the slot in the array to null.
|
public boolean hasNext()
hasNext
in interface java.util.Iterator
public java.lang.Object next() throws java.util.NoSuchElementException
Iterator
if it has at least one more element to provide.next
in interface java.util.Iterator
java.util.NoSuchElementException
- if no more elements exist.public void remove()
remove
in interface java.util.Iterator
java.lang.IllegalStateException
- if the next method has not yet been called, or the remove method has
already been called after the last call to the next method.Copyright © 2015-2024 StreamScape Technologies. All rights reserved.