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.archive.util.iterator
Class CompositeIterator

    java.lang.Object
      org.archive.util.iterator.CompositeIterator

All Implemented Interfaces:
  java.util.Iterator

    public class CompositeIterator

extends java.lang.Object
implements java.util.Iterator

An iterator that's built up out of any number of other iterators.

Author:
  gojomo

Field Summary
`(package private) java.util.Iterator` | `currentIterator`
`(package private) int` | `indexOfCurrentIterator`
`(package private) java.util.ArrayList<java.util.Iterator>` | `iterators`

Constructor Summary
`CompositeIterator()` Create an empty CompositeIterator.
`CompositeIterator(java.util.Iterator i1, java.util.Iterator i2)` Convenience method for concatenating together two iterators.

Method Summary
`void` | `add(java.util.Iterator i)` Add an iterator to the internal chain.
`boolean` | `hasNext()`
`java.lang.Object` | `next()`
`void` | `remove()`

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

Field Detail

### iterators

    java.util.ArrayList<java.util.Iterator> iterators

### currentIterator

    java.util.Iterator currentIterator

### indexOfCurrentIterator

    int indexOfCurrentIterator

Constructor Detail

### CompositeIterator

    public CompositeIterator()

  Create an empty CompositeIterator. Internal iterators may be added later.

### CompositeIterator

    public CompositeIterator(java.util.Iterator i1,
                             java.util.Iterator i2)

  Convenience method for concatenating together two iterators.

  Parameters:
    `i1` -
    `i2` -

Method Detail

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

### add

    public void add(java.util.Iterator i)

  Add an iterator to the internal chain.

  Parameters:
    `i` - an iterator to add.

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 © 2003-2008 Internet Archive. All Rights Reserved.