org.limewire.collection
Class MultiIterable<T>
java.lang.Object
org.limewire.collection.MultiIterable<T>
- All Implemented Interfaces:
- Iterable<T>
- Direct Known Subclasses:
- MultiCollection
public class MultiIterable<T>
- extends Object
- implements Iterable<T>
Lets you iterate over many Iterables easily.
LinkedList<String> activeList = new LinkedList<String>();
activeList.add("Abby");
activeList.add("Bob");
activeList.add("Chris");
LinkedList<String> inactiveList = new LinkedList<String>();
inactiveList.add("Anderson");
inactiveList.add("Baker");
for(String s : new MultiIterable<String>(activeList, inactiveList))
System.out.println(s.toLowerCase());
Output:
abby
bob
chris
anderson
baker
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiIterable
public MultiIterable(Iterable<? extends T> i1)
MultiIterable
public MultiIterable(Iterable<? extends T> i1,
Iterable<? extends T> i2)
MultiIterable
public MultiIterable(Iterable<? extends T> i1,
Iterable<? extends T> i2,
Iterable<? extends T> i3)
MultiIterable
public MultiIterable(Iterable<? extends T> i1,
Iterable<? extends T> i2,
Iterable<? extends T> i3,
Iterable<? extends T> i4)
MultiIterable
public MultiIterable(Iterable<? extends T>... iterables)
- Catch-all constructor.
iterator
public Iterator<T> iterator()
- Specified by:
iterator in interface Iterable<T>
Copyright © 2008 Lime Wire LLC. All Rights Reserved.