1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.5.0) on Thu May 15 17:17:33 EDT 2008 -->
6<TITLE>
7ForwardCursor (Oracle - Berkeley DB Java API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="com.sleepycat.persist.ForwardCursor interface">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="/style.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    parent.document.title="ForwardCursor (Oracle - Berkeley DB Java API)";
18}
19</SCRIPT>
20<NOSCRIPT>
21</NOSCRIPT>
22
23</HEAD>
24
25<BODY BGCOLOR="white" onload="windowTitle();">
26
27
28<!-- ========= START OF TOP NAVBAR ======= -->
29<A NAME="navbar_top"><!-- --></A>
30<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
32<TR>
33<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34<A NAME="navbar_top_firstrow"><!-- --></A>
35<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36  <TR ALIGN="center" VALIGN="top">
37  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
38  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
39  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ForwardCursor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
45  </TR>
46</TABLE>
47</TD>
48<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
49<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
50</TD>
51</TR>
52
53<TR>
54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55&nbsp;<A HREF="/com/sleepycat/persist/EntityStore.html" title="class in com.sleepycat.persist"><B>PREV CLASS</B></A>&nbsp;
56&nbsp;<A HREF="/com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist"><B>NEXT CLASS</B></A></FONT></TD>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58  <A HREF="/index.html?com/sleepycat/persist/ForwardCursor.html" target="_top"><B>FRAMES</B></A>  &nbsp;
59&nbsp;<A HREF="ForwardCursor.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
60&nbsp;<SCRIPT type="text/javascript">
61  <!--
62  if(window==top) {
63    document.writeln('<A HREF="/allclasses-noframe.html"><B>All Classes</B></A>');
64  }
65  //-->
66</SCRIPT>
67<NOSCRIPT>
68  <A HREF="/allclasses-noframe.html"><B>All Classes</B></A>
69</NOSCRIPT>
70
71
72</FONT></TD>
73</TR>
74<TR>
75<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
76  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
79</TR>
80</TABLE>
81<A NAME="skip-navbar_top"></A>
82<!-- ========= END OF TOP NAVBAR ========= -->
83
84<HR>
85<!-- ======== START OF CLASS DATA ======== -->
86<H2>
87<FONT SIZE="-1">
88com.sleepycat.persist</FONT>
89<BR>
90Interface ForwardCursor&lt;V&gt;</H2>
91<DL>
92<DT><B>All Superinterfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html" title="class or interface in java.lang">Iterable</A>&lt;V&gt;</DD>
93</DL>
94<DL>
95<DT><B>All Known Subinterfaces:</B> <DD><A HREF="/com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</A>&lt;V&gt;</DD>
96</DL>
97<HR>
98<DL>
99<DT><PRE>public interface <B>ForwardCursor&lt;V&gt;</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html" title="class or interface in java.lang">Iterable</A>&lt;V&gt;</DL>
100</PRE>
101
102<P>
103Cursor operations limited to traversing forward.  See <A HREF="/com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist"><CODE>EntityCursor</CODE></A>
104 for general information on cursors.
105
106 <p><code>ForwardCursor</code> objects are <em>not</em> thread-safe.  Cursors
107 should be opened, used and closed by a single thread.</p>
108
109 <p><em>WARNING:</em> Cursors must always be closed to prevent resource leaks
110 which could lead to the index becoming unusable or cause an
111 <code>OutOfMemoryError</code>.  To ensure that a cursor is closed in the
112 face of exceptions, close it in a finally block.</p>
113<P>
114
115<P>
116<HR>
117
118<P>
119
120<!-- ========== METHOD SUMMARY =========== -->
121
122<A NAME="method_summary"><!-- --></A>
123<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
124<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
125<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
126<B>Method Summary</B></FONT></TH>
127</TR>
128<TR BGCOLOR="white" CLASS="TableRowColor">
129<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
130<CODE>&nbsp;void</CODE></FONT></TD>
131<TD><CODE><B><A HREF="/com/sleepycat/persist/ForwardCursor.html#close()">close</A></B>()</CODE>
132
133<BR>
134&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes the cursor.</TD>
135</TR>
136<TR BGCOLOR="white" CLASS="TableRowColor">
137<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
138<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A>&lt;<A HREF="/com/sleepycat/persist/ForwardCursor.html" title="type parameter in ForwardCursor">V</A>&gt;</CODE></FONT></TD>
139<TD><CODE><B><A HREF="/com/sleepycat/persist/ForwardCursor.html#iterator()">iterator</A></B>()</CODE>
140
141<BR>
142&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an iterator over the key range, starting with the value
143 following the current position or at the first value if the cursor is
144 uninitialized.</TD>
145</TR>
146<TR BGCOLOR="white" CLASS="TableRowColor">
147<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
148<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A>&lt;<A HREF="/com/sleepycat/persist/ForwardCursor.html" title="type parameter in ForwardCursor">V</A>&gt;</CODE></FONT></TD>
149<TD><CODE><B><A HREF="/com/sleepycat/persist/ForwardCursor.html#iterator(com.sleepycat.db.LockMode)">iterator</A></B>(<A HREF="/com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A>&nbsp;lockMode)</CODE>
150
151<BR>
152&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an iterator over the key range, starting with the value
153 following the current position or at the first value if the cursor is
154 uninitialized.</TD>
155</TR>
156<TR BGCOLOR="white" CLASS="TableRowColor">
157<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
158<CODE>&nbsp;<A HREF="/com/sleepycat/persist/ForwardCursor.html" title="type parameter in ForwardCursor">V</A></CODE></FONT></TD>
159<TD><CODE><B><A HREF="/com/sleepycat/persist/ForwardCursor.html#next()">next</A></B>()</CODE>
160
161<BR>
162&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the next value and returns it, or returns null
163 if there are no more values in the cursor range.</TD>
164</TR>
165<TR BGCOLOR="white" CLASS="TableRowColor">
166<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
167<CODE>&nbsp;<A HREF="/com/sleepycat/persist/ForwardCursor.html" title="type parameter in ForwardCursor">V</A></CODE></FONT></TD>
168<TD><CODE><B><A HREF="/com/sleepycat/persist/ForwardCursor.html#next(com.sleepycat.db.LockMode)">next</A></B>(<A HREF="/com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A>&nbsp;lockMode)</CODE>
169
170<BR>
171&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the next value and returns it, or returns null
172 if there are no more values in the cursor range.</TD>
173</TR>
174</TABLE>
175&nbsp;
176<P>
177
178<!-- ============ METHOD DETAIL ========== -->
179
180<A NAME="method_detail"><!-- --></A>
181<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
182<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
183<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
184<B>Method Detail</B></FONT></TH>
185</TR>
186</TABLE>
187
188<A NAME="next()"><!-- --></A><H3>
189next</H3>
190<PRE>
191<A HREF="/com/sleepycat/persist/ForwardCursor.html" title="type parameter in ForwardCursor">V</A> <B>next</B>()
192       throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
193<DL>
194<DD>Moves the cursor to the next value and returns it, or returns null
195 if there are no more values in the cursor range.  If the cursor is
196 uninitialized, this method returns the first value.
197
198 <p><A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
199<P>
200<DD><DL>
201</DL>
202</DD>
203<DD><DL>
204
205<DT><B>Returns:</B><DD>the next value, or null if there are no more values in the
206 cursor range.
207<DT><B>Throws:</B>
208<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
209</DD>
210</DL>
211<HR>
212
213<A NAME="next(com.sleepycat.db.LockMode)"><!-- --></A><H3>
214next</H3>
215<PRE>
216<A HREF="/com/sleepycat/persist/ForwardCursor.html" title="type parameter in ForwardCursor">V</A> <B>next</B>(<A HREF="/com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A>&nbsp;lockMode)
217       throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
218<DL>
219<DD>Moves the cursor to the next value and returns it, or returns null
220 if there are no more values in the cursor range.  If the cursor is
221 uninitialized, this method returns the first value.
222<P>
223<DD><DL>
224</DL>
225</DD>
226<DD><DL>
227<DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
228 use <A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
229<DT><B>Returns:</B><DD>the next value, or null if there are no more values in the
230 cursor range.
231<DT><B>Throws:</B>
232<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
233</DD>
234</DL>
235<HR>
236
237<A NAME="iterator()"><!-- --></A><H3>
238iterator</H3>
239<PRE>
240<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A>&lt;<A HREF="/com/sleepycat/persist/ForwardCursor.html" title="type parameter in ForwardCursor">V</A>&gt; <B>iterator</B>()</PRE>
241<DL>
242<DD>Returns an iterator over the key range, starting with the value
243 following the current position or at the first value if the cursor is
244 uninitialized.
245
246 <p><A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
247<P>
248<DD><DL>
249<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html#iterator()" title="class or interface in java.lang">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html" title="class or interface in java.lang">Iterable</A>&lt;<A HREF="/com/sleepycat/persist/ForwardCursor.html" title="type parameter in ForwardCursor">V</A>&gt;</CODE></DL>
250</DD>
251<DD><DL>
252
253<DT><B>Returns:</B><DD>the iterator.</DL>
254</DD>
255</DL>
256<HR>
257
258<A NAME="iterator(com.sleepycat.db.LockMode)"><!-- --></A><H3>
259iterator</H3>
260<PRE>
261<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A>&lt;<A HREF="/com/sleepycat/persist/ForwardCursor.html" title="type parameter in ForwardCursor">V</A>&gt; <B>iterator</B>(<A HREF="/com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A>&nbsp;lockMode)</PRE>
262<DL>
263<DD>Returns an iterator over the key range, starting with the value
264 following the current position or at the first value if the cursor is
265 uninitialized.
266<P>
267<DD><DL>
268</DL>
269</DD>
270<DD><DL>
271<DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for all operations performed
272 using the iterator, or null to use <A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
273<DT><B>Returns:</B><DD>the iterator.</DL>
274</DD>
275</DL>
276<HR>
277
278<A NAME="close()"><!-- --></A><H3>
279close</H3>
280<PRE>
281void <B>close</B>()
282           throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
283<DL>
284<DD>Closes the cursor.
285<P>
286<DD><DL>
287</DL>
288</DD>
289<DD><DL>
290
291<DT><B>Throws:</B>
292<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
293</DD>
294</DL>
295<!-- ========= END OF CLASS DATA ========= -->
296<HR>
297
298
299<!-- ======= START OF BOTTOM NAVBAR ====== -->
300<A NAME="navbar_bottom"><!-- --></A>
301<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
302<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
303<TR>
304<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
305<A NAME="navbar_bottom_firstrow"><!-- --></A>
306<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
307  <TR ALIGN="center" VALIGN="top">
308  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
309  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
310  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
311  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ForwardCursor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
312  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
313  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
314  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
315  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
316  </TR>
317</TABLE>
318</TD>
319<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
320<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
321</TD>
322</TR>
323
324<TR>
325<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
326&nbsp;<A HREF="/com/sleepycat/persist/EntityStore.html" title="class in com.sleepycat.persist"><B>PREV CLASS</B></A>&nbsp;
327&nbsp;<A HREF="/com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist"><B>NEXT CLASS</B></A></FONT></TD>
328<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
329  <A HREF="/index.html?com/sleepycat/persist/ForwardCursor.html" target="_top"><B>FRAMES</B></A>  &nbsp;
330&nbsp;<A HREF="ForwardCursor.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
331&nbsp;<SCRIPT type="text/javascript">
332  <!--
333  if(window==top) {
334    document.writeln('<A HREF="/allclasses-noframe.html"><B>All Classes</B></A>');
335  }
336  //-->
337</SCRIPT>
338<NOSCRIPT>
339  <A HREF="/allclasses-noframe.html"><B>All Classes</B></A>
340</NOSCRIPT>
341
342
343</FONT></TD>
344</TR>
345<TR>
346<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
347  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
348<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
349DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
350</TR>
351</TABLE>
352<A NAME="skip-navbar_bottom"></A>
353<!-- ======== END OF BOTTOM NAVBAR ======= -->
354
355<HR>
356<font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
357</BODY>
358</HTML>
359