Constructor and Description |
---|
EmptyIterator()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns true if the iteration has more elements.
|
V |
next()
Returns the next element in the iteration.
|
void |
remove()
Removes from the underlying collection the last element returned by the
iterator; will always throw an exception since there never was such an
element.
|
public boolean hasNext()
public V next()
next
in interface Iterator<V>
NoSuchElementException
- iteration has no more elements (always).public void remove()
remove
in interface Iterator<V>
IllegalStateException
- since there are no elements in this
collection.Copyright © 2017. All rights reserved.