de.lmu.ifi.dbs.elki.utilities.iterator
Class IterableUtil

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.iterator.IterableUtil

public final class IterableUtil
extends Object

Utility function to wrap an Iterator as iterable.


Constructor Summary
IterableUtil()
           
 
Method Summary
static
<C> IterableIterator<C>
fromIterable(Iterable<C> iter)
          Wrap an Iterable as IterableIterator
static
<C> IterableIterator<C>
fromIterator(Iterator<C> iter)
          Wrap an iterator as Iterable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterableUtil

public IterableUtil()
Method Detail

fromIterator

public static <C> IterableIterator<C> fromIterator(Iterator<C> iter)
Wrap an iterator as Iterable.

Type Parameters:
C - Type restriction
Parameters:
iter - Iterator
Returns:
Iterable wrapper

fromIterable

public static <C> IterableIterator<C> fromIterable(Iterable<C> iter)
Wrap an Iterable as IterableIterator

Type Parameters:
C - Type restriction
Parameters:
iter - Iterator
Returns:
Iterable wrapper

Release 0.4.0 (2011-09-20_1324)