Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

    public class MetaDataIteratorChain

extends Object
implements MetaDataIterator

Metadata iterator that combines several iterators.

Author:
  Abe White

Constructor Summary
`MetaDataIteratorChain()` Default constructor.
`MetaDataIteratorChain(MetaDataIterator itr1, MetaDataIterator itr2)` Combine two iterators.

Method Summary
`void` | `addIterator(MetaDataIterator itr)` Add an iterator to the chain.
`void` | `close()` Close the resources used by this iterator.
`File` | `getFile()` Return the last-iterated metadata resource content as a file, or null if not an extant file.
`InputStream` | `getInputStream()` Return the last-iterated metadata resource content as a stream.
`boolean` | `hasNext()` Return whether there is another resource to iterate over.
`Object` | `next()` Return the next metadata resource.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MetaDataIteratorChain

    public MetaDataIteratorChain()

  Default constructor.

### MetaDataIteratorChain

    public MetaDataIteratorChain(MetaDataIterator itr1,
                                 MetaDataIterator itr2)

  Combine two iterators.

Method Detail

### addIterator

    public void addIterator(MetaDataIterator itr)

  Add an iterator to the chain.

### hasNext

    public boolean hasNext()
                    throws IOException

  Description copied from interface: `MetaDataIterator`
  Return whether there is another resource to iterate over.

  Specified by:
    `hasNext` in interface `MetaDataIterator`
  Throws:
    `IOException`

### next

    public Object next()
                throws IOException

  Description copied from interface: `MetaDataIterator`
  Return the next metadata resource.

  Specified by:
    `next` in interface `MetaDataIterator`
  Throws:
    `IOException`

### getInputStream

    public InputStream getInputStream()
                               throws IOException

  Description copied from interface: `MetaDataIterator`
  Return the last-iterated metadata resource content as a stream.

  Specified by:
    `getInputStream` in interface `MetaDataIterator`
  Throws:
    `IOException`

### getFile

    public File getFile()
                 throws IOException

  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 interface `MetaDataIterator`
  Throws:
    `IOException`

### close

    public void close()

  Description copied from interface: `MetaDataIterator`
  Close the resources used by this iterator.

  Specified by:
    `close` in interface `MetaDataIterator`
  Specified by:
    `close` in interface `Closeable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 Apache Software Foundation. All Rights Reserved.