net.sf.jga.algorithms
Class Transform.AdjacentIterable<T,R>

java.lang.Object
  extended by net.sf.jga.algorithms.Transform.AdjacentIterable<T,R>
All Implemented Interfaces:
java.lang.Iterable<R>
Enclosing class:
Transform

public static class Transform.AdjacentIterable<T,R>
extends java.lang.Object
implements java.lang.Iterable<R>

Produces iterators that will process successive pairs of elements of an iterable resource and present the results.


Constructor Summary
Transform.AdjacentIterable(java.lang.Iterable<? extends T> base, BinaryFunctor<T,T,R> process)
          Builds a TransformIterable for the given base.
 
Method Summary
 java.util.Iterator<R> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transform.AdjacentIterable

public Transform.AdjacentIterable(java.lang.Iterable<? extends T> base,
                                  BinaryFunctor<T,T,R> process)
Builds a TransformIterable for the given base.

Throws:
java.lang.IllegalArgumentException - if the base iterable is null
Method Detail

iterator

public java.util.Iterator<R> iterator()
Specified by:
iterator in interface java.lang.Iterable<R>


Copyright © 2002-2006 David A. Hall. All Rights Reserved.