01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2000,2008 Oracle. All rights reserved.
05: *
06: * $Id: BaseIterator.java,v 1.3.2.2 2008/01/07 15:14:06 cwl Exp $
07: */
08:
09: package com.sleepycat.collections;
10:
11: import java.util.ListIterator;
12:
13: /**
14: * Common interface for BlockIterator and StoredIterator.
15: */
16: interface 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: }
|