Package org.apache.openjpa.lib.meta
Class MetaDataIteratorChain
java.lang.Object
org.apache.openjpa.lib.meta.MetaDataIteratorChain
- All Implemented Interfaces:
MetaDataIterator
,Closeable
- Direct Known Subclasses:
ClasspathMetaDataIterator
Metadata iterator that combines several iterators.
- Author:
- Abe White
-
Constructor Summary
ConstructorDescriptionDefault constructor.MetaDataIteratorChain
(MetaDataIterator itr1, MetaDataIterator itr2) Combine two iterators. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an iterator to the chain.void
close()
Close the resources used by this iterator.getFile()
Return the last-iterated metadata resource content as a file, or null if not an extant file.Return the last-iterated metadata resource content as a stream.boolean
hasNext()
Return whether there is another resource to iterate over.next()
Return the next metadata resource.
-
Constructor Details
-
MetaDataIteratorChain
public MetaDataIteratorChain()Default constructor. -
MetaDataIteratorChain
Combine two iterators.
-
-
Method Details
-
addIterator
Add an iterator to the chain. -
hasNext
Description copied from interface:MetaDataIterator
Return whether there is another resource to iterate over.- Specified by:
hasNext
in interfaceMetaDataIterator
- Throws:
IOException
-
next
Description copied from interface:MetaDataIterator
Return the next metadata resource.- Specified by:
next
in interfaceMetaDataIterator
- Throws:
IOException
-
getInputStream
Description copied from interface:MetaDataIterator
Return the last-iterated metadata resource content as a stream.- Specified by:
getInputStream
in interfaceMetaDataIterator
- Throws:
IOException
-
getFile
Description copied from interface:MetaDataIterator
Return the last-iterated metadata resource content as a file, or null if not an extant file.- Specified by:
getFile
in interfaceMetaDataIterator
- Throws:
IOException
-
close
public void close()Description copied from interface:MetaDataIterator
Close the resources used by this iterator.- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceMetaDataIterator
-