csli.util.iterators
Class AggregateIter<E>

java.lang.Object
  extended by csli.util.iterators.AggregateIter<E>
Type Parameters:
E -
All Implemented Interfaces:
Iterable<E>

public class AggregateIter<E>
extends Object
implements Iterable<E>

Allows seamless iteration over a number of Iterables. Example: for (int x : new Aggregate(intList1, intList2, intList3)) ... Example: List dblList = CollectionUtils.newList(2., 3., 4.5); Set dblSet = CollectionUtils.newSet(4., 3.1415, 2.718); double sum = MathUtil.sum(new Aggregate(dblList, dblSet));

Author:
jefe

Constructor Summary
AggregateIter(Iterable<? extends E>... args)
           
AggregateIter(Iterable<? extends Iterable<? extends E>> arg)
           
 
Method Summary
 Iterator<E> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregateIter

public AggregateIter(Iterable<? extends E>... args)

AggregateIter

public AggregateIter(Iterable<? extends Iterable<? extends E>> arg)
Method Detail

iterator

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