hudson.util
Class AdaptedIterator<T,U>

java.lang.Object
  extended by hudson.util.AdaptedIterator<T,U>
All Implemented Interfaces:
Iterator<U>

public abstract class AdaptedIterator<T,U>
extends Object
implements Iterator<U>

Iterator that adapts the values returned from another iterator.

This class should be really in Iterators but for historical reasons it's here.

Since:
1.121
Author:
Kohsuke Kawaguchi
See Also:
Iterators

Constructor Summary
protected AdaptedIterator(Iterable<? extends T> core)
           
protected AdaptedIterator(Iterator<? extends T> core)
           
 
Method Summary
protected abstract  U adapt(T item)
           
 boolean hasNext()
           
 U next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdaptedIterator

protected AdaptedIterator(Iterator<? extends T> core)

AdaptedIterator

protected AdaptedIterator(Iterable<? extends T> core)
Method Detail

hasNext

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

next

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

adapt

protected abstract U adapt(T item)

remove

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


Copyright © 2004-2013. All Rights Reserved.