org.apache.blur.manager.results
Class PeekableIterator<T,E extends Exception>

java.lang.Object
  extended by org.apache.blur.manager.results.PeekableIterator<T,E>
All Implemented Interfaces:
BlurIterator<T,E>

public class PeekableIterator<T,E extends Exception>
extends Object
implements BlurIterator<T,E>


Method Summary
 long getPosition()
           
 boolean hasNext()
           
 T next()
           
 T peek()
          Only valid is hasNext is true.
static
<T,E extends Exception>
PeekableIterator<T,E>
wrap(BlurIterator<T,E> iterator)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

wrap

public static <T,E extends Exception> PeekableIterator<T,E> wrap(BlurIterator<T,E> iterator)
                                                    throws E extends Exception
Throws:
E extends Exception

peek

public T peek()
Only valid is hasNext is true. If hasNext if false, peek will return null;

Returns:

hasNext

public boolean hasNext()
                throws E extends Exception
Specified by:
hasNext in interface BlurIterator<T,E extends Exception>
Throws:
E extends Exception

next

public T next()
       throws E extends Exception
Specified by:
next in interface BlurIterator<T,E extends Exception>
Throws:
E extends Exception

getPosition

public long getPosition()
                 throws E extends Exception
Specified by:
getPosition in interface BlurIterator<T,E extends Exception>
Throws:
E extends Exception


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.