de.cau.cs.kieler.core.util
Class ProxyIterable<T>

java.lang.Object
  extended by de.cau.cs.kieler.core.util.ProxyIterable<T>
Type Parameters:
T - the type for the iterator
All Implemented Interfaces:
Iterable<T>

public final class ProxyIterable<T>
extends Object
implements Iterable<T>

A class for creating iterable instances to a given iterator.

Rating red

Constructor Summary
ProxyIterable(Iterator<T> iterator)
          Constructs a proxy iterable to a given iterator.
 
Method Summary
static
<T> ProxyIterable<T>
create(Iterator<T> iterator)
          Creates a proxy iterable to a given iterator.
 Iterator<T> iterator()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyIterable

public ProxyIterable(Iterator<T> iterator)
Constructs a proxy iterable to a given iterator.

Parameters:
iterator - the iterator
Method Detail

create

public static <T> ProxyIterable<T> create(Iterator<T> iterator)
Creates a proxy iterable to a given iterator.

Type Parameters:
T - the type for the iterator
Parameters:
iterator - the iterator
Returns:
the proxy iterable

iterator

public Iterator<T> iterator()

Specified by:
iterator in interface Iterable<T>