com.sleepycat.collections
Class BlockIterator<E>

java.lang.Object
  extended by com.sleepycat.collections.BaseIterator<E>
      extended by com.sleepycat.collections.BlockIterator<E>
All Implemented Interfaces:
Iterator<E>, ListIterator<E>

 class BlockIterator<E>
extends BaseIterator<E>

An iterator that does not need closing because a cursor is not kept open across method calls. A cursor is opened to read a block of records at a time and then closed before the method returns.

Author:
Mark Hayes

Constructor Summary
BlockIterator(StoredCollection<E> coll, boolean writeAllowed, int blockSize)
          Creates an iterator.
 
Method Summary
 void add(E value)
           
(package private)  ListIterator<E> dup()
           
 boolean hasNext()
           
 boolean hasPrevious()
           
(package private)  boolean isCurrentData(Object currentData)
           
(package private)  boolean moveToIndex(int index)
           
 E next()
           
 int nextIndex()
           
 E previous()
           
 int previousIndex()
           
 void remove()
           
 void set(E value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockIterator

BlockIterator(StoredCollection<E> coll,
              boolean writeAllowed,
              int blockSize)
Creates an iterator.

Method Detail

hasNext

public boolean hasNext()

hasPrevious

public boolean hasPrevious()

next

public E next()

previous

public E previous()

nextIndex

public int nextIndex()

previousIndex

public int previousIndex()

set

public void set(E value)

remove

public void remove()

add

public void add(E value)

dup

final ListIterator<E> dup()
Specified by:
dup in class BaseIterator<E>

isCurrentData

final boolean isCurrentData(Object currentData)
Specified by:
isCurrentData in class BaseIterator<E>

moveToIndex

final boolean moveToIndex(int index)
Specified by:
moveToIndex in class BaseIterator<E>


Copyright (c) 2004-2012 Oracle. All rights reserved.