org.omnaest.utils.structure.iterator
Class ChainedIterable<T>

java.lang.Object
  extended by org.omnaest.utils.structure.iterator.ChainedIterable<T>
Type Parameters:
T -
All Implemented Interfaces:
Iterable<T>

public class ChainedIterable<T>
extends Object
implements Iterable<T>

A ChainedIterable allows to chain a given array of Iterable instances and merge them together into one single Iterable. The given order of the array is kept during iteration.

Author:
Omnaest
See Also:
Iterable

Field Summary
protected  Iterable<T>[] iterables
           
 
Constructor Summary
ChainedIterable(Iterable<T>... iterables)
           
 
Method Summary
 Iterator<T> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iterables

protected Iterable<T>[] iterables
Constructor Detail

ChainedIterable

public ChainedIterable(Iterable<T>... iterables)
Parameters:
iterables -
See Also:
ChainedIterable
Method Detail

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>


Copyright © 2013. All Rights Reserved.