org.geotools.data.store
Class NoContentIterator
java.lang.Object
org.geotools.data.store.NoContentIterator
- All Implemented Interfaces:
- java.util.Iterator
- public class NoContentIterator
- extends java.lang.Object
- implements java.util.Iterator
This iterator is used to indicate that contents could not be aquired.
The normal Collection.iterator() method does not let us return an error
(we always have to return an iterator). However Iterator.next() can
be used to return an NoSuchElementException.
So we are basically going to lie, we are going to pretend their is content
*once*, and when they ask for it we are going to hit them with
a NoSuchElementExcetion. This is a mean trick, but it does convey the idea
of asking for content that is supposed to be there and failing to aquire it.
- Since:
- 2.1.RC0
- Author:
- jgarnett
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NoContentIterator
public NoContentIterator(java.lang.Throwable t)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator
next
public java.lang.Object next()
- Specified by:
next
in interface java.util.Iterator
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator
Copyright © GeoTools. All Rights Reserved.