org.apache.accumulo.core.util
Class PeekingIterator<E>

java.lang.Object
  extended by org.apache.accumulo.core.util.PeekingIterator<E>
All Implemented Interfaces:
Iterator<E>

public class PeekingIterator<E>
extends Object
implements Iterator<E>


Constructor Summary
PeekingIterator()
          Creates an uninitialized instance.
PeekingIterator(Iterator<E> source)
           
 
Method Summary
 boolean hasNext()
           
 PeekingIterator<E> initialize(Iterator<E> source)
          Initializes this iterator, to be used with PeekingIterator().
 E next()
           
 E peek()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeekingIterator

public PeekingIterator(Iterator<E> source)

PeekingIterator

public PeekingIterator()
Creates an uninitialized instance. This should be used in conjunction with initialize(Iterator).

Method Detail

initialize

public PeekingIterator<E> initialize(Iterator<E> source)
Initializes this iterator, to be used with PeekingIterator().


peek

public E peek()

next

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

remove

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

hasNext

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


Copyright © 2013 Apache Accumulo Project. All Rights Reserved.