org.apache.flume.util
Class SpecificOrderIterator<T>

java.lang.Object
  extended by org.apache.flume.util.SpecificOrderIterator<T>
All Implemented Interfaces:
Iterator<T>

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

A utility class that iterates over the given ordered list of items via the specified order array. The entries of the order array indicate the index within the ordered list of items that needs to be picked over the course of iteration.


Constructor Summary
SpecificOrderIterator(int[] orderArray, List<T> itemList)
           
 
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

SpecificOrderIterator

public SpecificOrderIterator(int[] orderArray,
                             List<T> itemList)
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 © 2009-2015 Apache Software Foundation. All Rights Reserved.