org.opennms.core.utils
Class FilteringIterator<T>

java.lang.Object
  extended by org.opennms.core.utils.FilteringIterator<T>
All Implemented Interfaces:
Iterable<T>, Iterator<T>

public abstract class FilteringIterator<T>
extends Object
implements Iterator<T>, Iterable<T>


Constructor Summary
FilteringIterator(Iterable<T> iterable)
           
FilteringIterator(Iterator<T> iterator)
           
 
Method Summary
 boolean hasNext()
           
 Iterator<T> iterator()
           
protected abstract  boolean matches(T item)
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteringIterator

public FilteringIterator(Iterable<T> iterable)

FilteringIterator

public FilteringIterator(Iterator<T> iterator)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<T>

matches

protected abstract boolean matches(T item)

next

public T next()
Specified by:
next in interface Iterator<T>

remove

public void remove()
Specified by:
remove in interface Iterator<T>

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>


Copyright © 2009. All Rights Reserved.