net.sf.jga.util

Class FilterIterator<T>

public class FilterIterator<T> extends Object implements Iterator<T>

Iterator that only returns elements that meet the given selection criteria.

Copyright © 2002 David A. Hall

Author: David A. Hall

Constructor Summary
FilterIterator(Iterator<? extends T> iter, UnaryFunctor<T,Boolean> pred)
Method Summary
booleanhasNext()
Tnext()
voidremove()

Constructor Detail

FilterIterator

public FilterIterator(Iterator<? extends T> iter, UnaryFunctor<T,Boolean> pred)

Method Detail

hasNext

public boolean hasNext()

next

public T next()

remove

public void remove()