csli.util.iterators
Class AggregateIter<E>
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AggregateIter
public AggregateIter(Iterable<? extends E>... args)
AggregateIter
public AggregateIter(Iterable<? extends Iterable<? extends E>> arg)
iterator
public Iterator<E> iterator()
- Specified by:
iterator in interface Iterable<E>