org.egothor.core
Class Iter2Seq<T>

java.lang.Object
  extended by org.egothor.core.Iter2Seq<T>
All Implemented Interfaces:
Sequence<T>

public class Iter2Seq<T>
extends java.lang.Object
implements Sequence<T>

The Iter2Seq class exists to wrap an Iterator inside a Sequence.

Author:
Leo Galambos

Constructor Summary
Iter2Seq(java.util.Iterator<T> i)
          Constructor for the Iter2Seq object.
 
Method Summary
 T next()
          Return the next element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Iter2Seq

public Iter2Seq(java.util.Iterator<T> i)
Constructor for the Iter2Seq object.

Parameters:
i - the Iterator inside this object
Method Detail

next

public T next()
Return the next element.

Specified by:
next in interface Sequence<T>
Returns:
the next element