Package org.intermine.util
Class IteratorIterable<T>
- java.lang.Object
-
- org.intermine.util.IteratorIterable<T>
-
- Type Parameters:
T
- The element type
- All Implemented Interfaces:
java.lang.Iterable<T>
public class IteratorIterable<T> extends java.lang.Object implements java.lang.Iterable<T>
This is an Iterable that returns a given Iterator. This is useful for using the new for loop syntax when you only have an Iterator.- Author:
- Matthew Wakeling
-
-
Constructor Summary
Constructors Constructor Description IteratorIterable(java.util.Iterator<T> iterator)
Constructs an Iterable from an Iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<T>
iterator()
Returns the iterator.
-
-
-
Constructor Detail
-
IteratorIterable
public IteratorIterable(java.util.Iterator<T> iterator)
Constructs an Iterable from an Iterator.- Parameters:
iterator
- an Iterator
-
-