ConcatenatedIterator (Alignment API and Server)
Date: 2010-03-31

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

## fr.inrialpes.exmo.align.impl
Class ConcatenatedIterator<O>

    java.lang.Object
      fr.inrialpes.exmo.align.impl.ConcatenatedIterator<O>

All Implemented Interfaces:
  Iterable<O>, Iterator<O>

    public final class ConcatenatedIterator<O>

extends Object
implements Iterator<O>, Iterable<O>

This class builds a composite iterator from two iterators This helps writing more concise code. This is the naive implementation (can be optimized)

Version:
  $Id: ConcatenatedIterator.java 899 2009-01-11 12:47:29Z euzenat $
Author:
  Jérôme Euzenat

Field Summary
`private Iterator<O>` | `it1`
`private Iterator<O>` | `it2`

Constructor Summary
`ConcatenatedIterator(Iterator<O> i1, Iterator<O> i2)`

Method Summary
`boolean` | `hasNext()`
`Iterator<O>` | `iterator()`
`O` | `next()`
`void` | `remove()`

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

Field Detail

### it1

    private Iterator<O> it1

### it2

    private Iterator<O> it2

Constructor Detail

### ConcatenatedIterator

    public ConcatenatedIterator(Iterator<O> i1,
                                Iterator<O> i2)

Method Detail

### hasNext

    public boolean hasNext()

  Specified by:
    `hasNext` in interface `Iterator<O>`

### next

    public O next()
           throws NoSuchElementException

  Specified by:
    `next` in interface `Iterator<O>`
  Throws:
    `NoSuchElementException`

### remove

    public void remove()
                throws UnsupportedOperationException

  Specified by:
    `remove` in interface `Iterator<O>`
  Throws:
    `UnsupportedOperationException`

### iterator

    public Iterator<O> iterator()

  Specified by:
    `iterator` in interface `Iterable<O>`

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

(C) INRIA & friends, 2003-2010