net.sf.jga.algorithms
Class Filter.FilterIterable<T>

java.lang.Object
  extended by net.sf.jga.algorithms.Filter.FilterIterable<T>
All Implemented Interfaces:
java.lang.Iterable<T>
Enclosing class:
Filter

public static class Filter.FilterIterable<T>
extends java.lang.Object
implements java.lang.Iterable<T>

Produces Iterators that only return elements that meet a given condition.


Constructor Summary
Filter.FilterIterable(java.lang.Iterable<? extends T> iter, UnaryFunctor<T,java.lang.Boolean> pred)
          Builds a FilterIterator that will return only qualifying elements of the given iterable.
 
Method Summary
 java.util.Iterator<T> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Filter.FilterIterable

public Filter.FilterIterable(java.lang.Iterable<? extends T> iter,
                             UnaryFunctor<T,java.lang.Boolean> pred)
Builds a FilterIterator that will return only qualifying elements of the given iterable.

Method Detail

iterator

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


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