com.sun.enterprise.module.common_impl
Class FlattenIterator<T>

java.lang.Object
  extended by com.sun.enterprise.module.common_impl.FlattenIterator<T>
All Implemented Interfaces:
Iterator<T>

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

Iterator implementation that works like Lisp "flatten" function.

Author:
Kohsuke Kawaguchi

Constructor Summary
FlattenIterator(Iterator<? extends Iterator<? extends T>> source)
           
 
Method Summary
 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

FlattenIterator

public FlattenIterator(Iterator<? extends Iterator<? extends T>> source)
Method Detail

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 © 2013 Oracle Corporation. All Rights Reserved.