hudson.util
Class Iterators.FilterIterator<T>

java.lang.Object
  extended by hudson.util.Iterators.FilterIterator<T>
All Implemented Interfaces:
Iterator<T>
Direct Known Subclasses:
Iterators.DuplicateFilterIterator
Enclosing class:
Iterators

public abstract static class Iterators.FilterIterator<T>
extends Object
implements Iterator<T>

Creates a filtered view of another iterator.

Since:
1.150

Constructor Summary
protected Iterators.FilterIterator(Iterable<? extends T> core)
           
protected Iterators.FilterIterator(Iterator<? extends T> core)
           
 
Method Summary
protected abstract  boolean filter(T t)
          Filter out items in the original collection.
 boolean hasNext()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Iterators.FilterIterator

protected Iterators.FilterIterator(Iterator<? extends T> core)

Iterators.FilterIterator

protected Iterators.FilterIterator(Iterable<? extends T> core)
Method Detail

filter

protected abstract boolean filter(T t)
Filter out items in the original collection.

Returns:
true to leave this item and return this item from this iterator. false to hide this item.

hasNext

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

next

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

remove

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


Copyright © 2004-2013. All Rights Reserved.