org.xcmis.spi
Class LazyIterator<T>

java.lang.Object
  extended by org.xcmis.spi.LazyIterator<T>
All Implemented Interfaces:
Iterator<T>, ItemsIterator<T>

public abstract class LazyIterator<T>
extends Object
implements ItemsIterator<T>

Version:
$Id$
Author:
Andrey Parfonov

Field Summary
protected  T next
           
 
Constructor Summary
LazyIterator()
           
 
Method Summary
protected abstract  void fetchNext()
          To fetch next item and set it in field next
 boolean hasNext()
          
 T next()
          
 void remove()
          
 void skip(int skip)
          Skip specified number of element in collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xcmis.spi.ItemsIterator
size
 

Field Detail

next

protected T next
Constructor Detail

LazyIterator

public LazyIterator()
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>

skip

public void skip(int skip)
          throws NoSuchElementException
Skip specified number of element in collection.

Specified by:
skip in interface ItemsIterator<T>
Parameters:
skip - the number of items to skip
Throws:
NoSuchElementException - if skipped past the last item in the iterator

fetchNext

protected abstract void fetchNext()
To fetch next item and set it in field next



Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.