Package org.xmldb.api.sdk
Class SimpleResourceIterator
- java.lang.Object
-
- org.xmldb.api.sdk.SimpleResourceIterator
-
- All Implemented Interfaces:
ResourceIterator
public class SimpleResourceIterator extends java.lang.Object implements ResourceIterator
ResourceIterator is used to iterate over a set of resources.
-
-
Constructor Summary
Constructors Constructor Description SimpleResourceIterator(java.util.List resources)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasMoreResources()Returns true as long as there are still more resources to be iterated.ResourcenextResource()Returns the nextResourceinstance in the iterator.
-
-
-
Method Detail
-
hasMoreResources
public boolean hasMoreResources() throws XMLDBExceptionReturns true as long as there are still more resources to be iterated.- Specified by:
hasMoreResourcesin interfaceResourceIterator- Returns:
- true if there are more resources to iterate, false otherwise.
- Throws:
XMLDBException- with expected error codes.
ErrorCodes.VENDOR_ERRORfor any vendor specific errors that occur.
-
nextResource
public Resource nextResource() throws XMLDBException
Returns the nextResourceinstance in the iterator.- Specified by:
nextResourcein interfaceResourceIterator- Returns:
- the next
Resourceinstance in the iterator. - Throws:
XMLDBException- with expected error codes.
ErrorCodes.VENDOR_ERRORfor any vendor specific errors that occur.
ErrorCodes.NO_SUCH_RESOURCEif the resource iterator is empty or all resources have already been retrieved.
-
-