Class IterableAdaptor<T>

java.lang.Object
repast.simphony.util.collections.IterableAdaptor<T>
All Implemented Interfaces:
Iterable<T>

public class IterableAdaptor<T> extends Object implements Iterable<T>
Adapts an iterator into an iterable.
Version:
$Revision$ $Date$
Author:
Nick Collier
  • Constructor Details

    • IterableAdaptor

      public IterableAdaptor(Iterator<T> iter)
      Creates an IterableAdaptor for the specified iterator.
      Parameters:
      iter -
  • Method Details

    • iterator

      public Iterator<T> iterator()
      Returns an iterator over a set of elements of type T.
      Specified by:
      iterator in interface Iterable<T>
      Returns:
      an Iterator.