|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javatools.datatypes.CombinedIterable<T>
public class CombinedIterable<T>
This class is part of the Java Tools (see http://mpii.de/yago-naga/javatools).
It is licensed under the Creative Commons Attribution License
(see http://creativecommons.org/licenses/by/3.0) by
the YAGO-NAGA team (see http://mpii.de/yago-naga).
The class combines multiple iterables to one iterable.
This can be used in a for-each-loop.
Example:
for(Object o : new CombinedIterable(list1,list2)) process(o);
Constructor Summary | |
---|---|
CombinedIterable()
Creates an empty CombinedIterator |
|
CombinedIterable(java.lang.Iterable<? extends T>... its)
Creates a CombinedIterator from some iterators (may give a (useless) Java compiler warning) |
|
CombinedIterable(java.lang.Iterable<? extends T> i1)
Creates a CombinedIterator from one iterator |
|
CombinedIterable(java.lang.Iterable<? extends T> i1,
java.lang.Iterable<? extends T> i2)
Creates a CombinedIterator two iterators |
|
CombinedIterable(java.lang.Iterable<? extends T> i1,
java.lang.Iterable<? extends T> i2,
java.lang.Iterable<? extends T> i3)
Creates a CombinedIterator three iterators |
|
CombinedIterable(T i)
Adds a set |
Method Summary | |
---|---|
CombinedIterable<T> |
add(java.lang.Iterable<? extends T> i)
Adds an iterable |
CombinedIterable<T> |
add(T i)
Adds a value |
void |
close()
|
java.util.Iterator<T> |
iterator()
Returns this |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CombinedIterable()
public CombinedIterable(java.lang.Iterable<? extends T> i1, java.lang.Iterable<? extends T> i2)
public CombinedIterable(java.lang.Iterable<? extends T> i1)
public CombinedIterable(java.lang.Iterable<? extends T> i1, java.lang.Iterable<? extends T> i2, java.lang.Iterable<? extends T> i3)
public CombinedIterable(T i)
public CombinedIterable(java.lang.Iterable<? extends T>... its)
Method Detail |
---|
public CombinedIterable<T> add(java.lang.Iterable<? extends T> i)
public CombinedIterable<T> add(T i)
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public java.lang.String toString()
toString
in class java.lang.Object
public void close() throws java.io.IOException
close
in interface java.io.Closeable
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |