1/*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 2000,2008 Oracle. All rights reserved. 5 * 6 * $Id: BaseIterator.java,v 12.5 2008/01/08 20:58:36 bostic Exp $ 7 */ 8 9package com.sleepycat.collections; 10 11import java.util.ListIterator; 12 13/** 14 * Common interface for BlockIterator and StoredIterator. 15 */ 16interface BaseIterator extends ListIterator { 17 18 /** 19 * Duplicate a cursor. Called by StoredCollections.iterator. 20 */ 21 ListIterator dup(); 22 23 /** 24 * Returns whether the given data is the current iterator data. Called by 25 * StoredMapEntry.setValue. 26 */ 27 boolean isCurrentData(Object currentData); 28 29 /** 30 * Initializes a list iterator at the given index. Called by 31 * StoredList.iterator(int). 32 */ 33 boolean moveToIndex(int index); 34} 35