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.6.0_03) on Mon Apr 12 16:25:49 EDT 2010 --> 6<TITLE> 7StoredIterator (Oracle - Berkeley DB Java API) 8</TITLE> 9 10<META NAME="date" CONTENT="2010-04-12"> 11 12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style"> 13 14<SCRIPT type="text/javascript"> 15function windowTitle() 16{ 17 if (location.href.indexOf('is-external=true') == -1) { 18 parent.document.title="StoredIterator (Oracle - Berkeley DB Java API)"; 19 } 20} 21</SCRIPT> 22<NOSCRIPT> 23</NOSCRIPT> 24 25</HEAD> 26 27<BODY BGCOLOR="white" onload="windowTitle();"> 28<HR> 29 30 31<!-- ========= START OF TOP NAVBAR ======= --> 32<A NAME="navbar_top"><!-- --></A> 33<A HREF="#skip-navbar_top" title="Skip navigation links"></A> 34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 35<TR> 36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 37<A NAME="navbar_top_firstrow"><!-- --></A> 38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 39 <TR ALIGN="center" VALIGN="top"> 40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/StoredIterator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 48 </TR> 49</TABLE> 50</TD> 51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 52<b>Berkeley DB</b><br><font size="-1"> version 4.8.30</font></EM> 53</TD> 54</TR> 55 56<TR> 57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 58 <A HREF="../../../com/sleepycat/collections/StoredEntrySet.html" title="class in com.sleepycat.collections"><B>PREV CLASS</B></A> 59 <A HREF="../../../com/sleepycat/collections/StoredKeySet.html" title="class in com.sleepycat.collections"><B>NEXT CLASS</B></A></FONT></TD> 60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 61 <A HREF="../../../index.html?com/sleepycat/collections/StoredIterator.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="StoredIterator.html" target="_top"><B>NO FRAMES</B></A> 63 <SCRIPT type="text/javascript"> 64 <!-- 65 if(window==top) { 66 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); 67 } 68 //--> 69</SCRIPT> 70<NOSCRIPT> 71 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> 72</NOSCRIPT> 73 74 75</FONT></TD> 76</TR> 77<TR> 78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 79 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 81DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 82</TR> 83</TABLE> 84<A NAME="skip-navbar_top"></A> 85<!-- ========= END OF TOP NAVBAR ========= --> 86 87<HR> 88<!-- ======== START OF CLASS DATA ======== --> 89<H2> 90<FONT SIZE="-1"> 91com.sleepycat.collections</FONT> 92<BR> 93Class StoredIterator<E></H2> 94<PRE> 95<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> 96 <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.sleepycat.collections.StoredIterator<E></B> 97</PRE> 98<DL> 99<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><E>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</A><E></DD> 100</DL> 101<HR> 102<DL> 103<DT><PRE>public class <B>StoredIterator<E></B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</A><E>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</A></DL> 104</PRE> 105 106<P> 107The Iterator returned by all stored collections. 108 109 <p>While in general this class conforms to the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><CODE>Iterator</CODE></A> interface, 110 it is important to note that all iterators for stored collections must be 111 explicitly closed with <A HREF="../../../com/sleepycat/collections/StoredIterator.html#close()"><CODE>close()</CODE></A>. The static method <A HREF="../../../com/sleepycat/collections/StoredIterator.html#close(java.util.Iterator)"><CODE>close(java.util.Iterator)</CODE></A> allows calling close for all iterators without 112 harm to iterators that are not from stored collections, and also avoids 113 casting. If a stored iterator is not closed, unpredictable behavior 114 including process death may result.</p> 115 116 <p>This class implements the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><CODE>Iterator</CODE></A> interface for all stored 117 iterators. It also implements <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util"><CODE>ListIterator</CODE></A> because some list 118 iterator methods apply to all stored iterators, for example, <A HREF="../../../com/sleepycat/collections/StoredIterator.html#previous()"><CODE>previous()</CODE></A> and <A HREF="../../../com/sleepycat/collections/StoredIterator.html#hasPrevious()"><CODE>hasPrevious()</CODE></A>. Other list iterator methods are always 119 supported for lists, but for other types of collections are only supported 120 under certain conditions. See <A HREF="../../../com/sleepycat/collections/StoredIterator.html#nextIndex()"><CODE>nextIndex()</CODE></A>, <A HREF="../../../com/sleepycat/collections/StoredIterator.html#previousIndex()"><CODE>previousIndex()</CODE></A>, 121 <A HREF="../../../com/sleepycat/collections/StoredIterator.html#add(E)"><CODE>add(E)</CODE></A> and <A HREF="../../../com/sleepycat/collections/StoredIterator.html#set(E)"><CODE>set(E)</CODE></A> for details.</p> 122 123 <p>In addition, this class provides the following methods for stored 124 collection iterators only. Note that the use of these methods is not 125 compatible with the standard Java collections interface.</p> 126 <ul> 127 <li><A HREF="../../../com/sleepycat/collections/StoredIterator.html#close()"><CODE>close()</CODE></A></li> 128 <li><A HREF="../../../com/sleepycat/collections/StoredIterator.html#close(java.util.Iterator)"><CODE>close(Iterator)</CODE></A></li> 129 <li><A HREF="../../../com/sleepycat/collections/StoredIterator.html#count()"><CODE>count()</CODE></A></li> 130 <li><A HREF="../../../com/sleepycat/collections/StoredIterator.html#getCollection()"><CODE>getCollection()</CODE></A></li> 131 <li><A HREF="../../../com/sleepycat/collections/StoredIterator.html#setReadModifyWrite(boolean)"><CODE>setReadModifyWrite(boolean)</CODE></A></li> 132 <li><A HREF="../../../com/sleepycat/collections/StoredIterator.html#isReadModifyWrite()"><CODE>isReadModifyWrite()</CODE></A></li> 133 </ul> 134<P> 135 136<P> 137<HR> 138 139<P> 140 141<!-- ========== METHOD SUMMARY =========== --> 142 143<A NAME="method_summary"><!-- --></A> 144<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 145<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 146<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 147<B>Method Summary</B></FONT></TH> 148</TR> 149<TR BGCOLOR="white" CLASS="TableRowColor"> 150<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 151<CODE> void</CODE></FONT></TD> 152<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#add(E)">add</A></B>(<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A> value)</CODE> 153 154<BR> 155 Inserts the specified element into the list or inserts a duplicate into 156 other types of collections (optional operation).</TD> 157</TR> 158<TR BGCOLOR="white" CLASS="TableRowColor"> 159<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 160<CODE> void</CODE></FONT></TD> 161<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#close()">close</A></B>()</CODE> 162 163<BR> 164 Closes this iterator.</TD> 165</TR> 166<TR BGCOLOR="white" CLASS="TableRowColor"> 167<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 168<CODE>static void</CODE></FONT></TD> 169<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#close(java.util.Iterator)">close</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><?> i)</CODE> 170 171<BR> 172 Closes the given iterator using <A HREF="../../../com/sleepycat/collections/StoredIterator.html#close()"><CODE>close()</CODE></A> if it is a <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="class in com.sleepycat.collections"><CODE>StoredIterator</CODE></A>.</TD> 173</TR> 174<TR BGCOLOR="white" CLASS="TableRowColor"> 175<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 176<CODE> int</CODE></FONT></TD> 177<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#count()">count</A></B>()</CODE> 178 179<BR> 180 Returns the number of elements having the same key value as the key 181 value of the element last returned by next() or previous().</TD> 182</TR> 183<TR BGCOLOR="white" CLASS="TableRowColor"> 184<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 185<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE></FONT></TD> 186<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#dup()">dup</A></B>()</CODE> 187 188<BR> 189 Internal use only.</TD> 190</TR> 191<TR BGCOLOR="white" CLASS="TableRowColor"> 192<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 193<CODE> <A HREF="../../../com/sleepycat/collections/StoredCollection.html" title="class in com.sleepycat.collections">StoredCollection</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE></FONT></TD> 194<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#getCollection()">getCollection</A></B>()</CODE> 195 196<BR> 197 Returns the collection associated with this iterator.</TD> 198</TR> 199<TR BGCOLOR="white" CLASS="TableRowColor"> 200<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 201<CODE> boolean</CODE></FONT></TD> 202<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#hasNext()">hasNext</A></B>()</CODE> 203 204<BR> 205 Returns true if this iterator has more elements when traversing in the 206 forward direction.</TD> 207</TR> 208<TR BGCOLOR="white" CLASS="TableRowColor"> 209<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 210<CODE> boolean</CODE></FONT></TD> 211<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#hasPrevious()">hasPrevious</A></B>()</CODE> 212 213<BR> 214 Returns true if this iterator has more elements when traversing in the 215 reverse direction.</TD> 216</TR> 217<TR BGCOLOR="white" CLASS="TableRowColor"> 218<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 219<CODE> boolean</CODE></FONT></TD> 220<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#isCurrentData(java.lang.Object)">isCurrentData</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> currentData)</CODE> 221 222<BR> 223 Internal use only.</TD> 224</TR> 225<TR BGCOLOR="white" CLASS="TableRowColor"> 226<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 227<CODE> boolean</CODE></FONT></TD> 228<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#isReadModifyWrite()">isReadModifyWrite</A></B>()</CODE> 229 230<BR> 231 Returns whether write-locks will be obtained when reading with this 232 cursor.</TD> 233</TR> 234<TR BGCOLOR="white" CLASS="TableRowColor"> 235<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 236<CODE> boolean</CODE></FONT></TD> 237<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#moveToIndex(int)">moveToIndex</A></B>(int index)</CODE> 238 239<BR> 240 Internal use only.</TD> 241</TR> 242<TR BGCOLOR="white" CLASS="TableRowColor"> 243<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 244<CODE> <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A></CODE></FONT></TD> 245<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#next()">next</A></B>()</CODE> 246 247<BR> 248 Returns the next element in the iteration.</TD> 249</TR> 250<TR BGCOLOR="white" CLASS="TableRowColor"> 251<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 252<CODE> int</CODE></FONT></TD> 253<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#nextIndex()">nextIndex</A></B>()</CODE> 254 255<BR> 256 Returns the index of the element that would be returned by a subsequent 257 call to next.</TD> 258</TR> 259<TR BGCOLOR="white" CLASS="TableRowColor"> 260<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 261<CODE> <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A></CODE></FONT></TD> 262<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#previous()">previous</A></B>()</CODE> 263 264<BR> 265 Returns the next element in the iteration.</TD> 266</TR> 267<TR BGCOLOR="white" CLASS="TableRowColor"> 268<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 269<CODE> int</CODE></FONT></TD> 270<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#previousIndex()">previousIndex</A></B>()</CODE> 271 272<BR> 273 Returns the index of the element that would be returned by a subsequent 274 call to previous.</TD> 275</TR> 276<TR BGCOLOR="white" CLASS="TableRowColor"> 277<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 278<CODE> void</CODE></FONT></TD> 279<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#remove()">remove</A></B>()</CODE> 280 281<BR> 282 Removes the last element that was returned by next or previous (optional 283 operation).</TD> 284</TR> 285<TR BGCOLOR="white" CLASS="TableRowColor"> 286<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 287<CODE> void</CODE></FONT></TD> 288<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#set(E)">set</A></B>(<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A> value)</CODE> 289 290<BR> 291 Replaces the last element returned by next or previous with the 292 specified element (optional operation).</TD> 293</TR> 294<TR BGCOLOR="white" CLASS="TableRowColor"> 295<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 296<CODE> void</CODE></FONT></TD> 297<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#setReadModifyWrite(boolean)">setReadModifyWrite</A></B>(boolean lockForWrite)</CODE> 298 299<BR> 300 Changes whether write-locks will be obtained when reading with this 301 cursor.</TD> 302</TR> 303</TABLE> 304 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> 305<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 306<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 307<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> 308</TR> 309<TR BGCOLOR="white" CLASS="TableRowColor"> 310<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> 311</TR> 312</TABLE> 313 314<P> 315 316<!-- ============ METHOD DETAIL ========== --> 317 318<A NAME="method_detail"><!-- --></A> 319<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 320<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 321<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 322<B>Method Detail</B></FONT></TH> 323</TR> 324</TABLE> 325 326<A NAME="close(java.util.Iterator)"><!-- --></A><H3> 327close</H3> 328<PRE> 329public static void <B>close</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><?> i)</PRE> 330<DL> 331<DD>Closes the given iterator using <A HREF="../../../com/sleepycat/collections/StoredIterator.html#close()"><CODE>close()</CODE></A> if it is a <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="class in com.sleepycat.collections"><CODE>StoredIterator</CODE></A>. If the given iterator is not a <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="class in com.sleepycat.collections"><CODE>StoredIterator</CODE></A>, 332 this method does nothing. 333<P> 334<DD><DL> 335</DL> 336</DD> 337<DD><DL> 338<DT><B>Parameters:</B><DD><CODE>i</CODE> - is the iterator to close. 339<DT><B>Throws:</B> 340<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.</DL> 341</DD> 342</DL> 343<HR> 344 345<A NAME="isReadModifyWrite()"><!-- --></A><H3> 346isReadModifyWrite</H3> 347<PRE> 348public final boolean <B>isReadModifyWrite</B>()</PRE> 349<DL> 350<DD>Returns whether write-locks will be obtained when reading with this 351 cursor. 352 Obtaining write-locks can prevent deadlocks when reading and then 353 modifying data. 354<P> 355<DD><DL> 356</DL> 357</DD> 358<DD><DL> 359 360<DT><B>Returns:</B><DD>the write-lock setting.</DL> 361</DD> 362</DL> 363<HR> 364 365<A NAME="setReadModifyWrite(boolean)"><!-- --></A><H3> 366setReadModifyWrite</H3> 367<PRE> 368public void <B>setReadModifyWrite</B>(boolean lockForWrite)</PRE> 369<DL> 370<DD>Changes whether write-locks will be obtained when reading with this 371 cursor. 372 Obtaining write-locks can prevent deadlocks when reading and then 373 modifying data. 374<P> 375<DD><DL> 376</DL> 377</DD> 378<DD><DL> 379<DT><B>Parameters:</B><DD><CODE>lockForWrite</CODE> - the write-lock setting.</DL> 380</DD> 381</DL> 382<HR> 383 384<A NAME="hasNext()"><!-- --></A><H3> 385hasNext</H3> 386<PRE> 387public boolean <B>hasNext</B>()</PRE> 388<DL> 389<DD>Returns true if this iterator has more elements when traversing in the 390 forward direction. False is returned if the iterator has been closed. 391 This method conforms to the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true#hasNext()" title="class or interface in java.util"><CODE>Iterator.hasNext()</CODE></A> interface. 392<P> 393<DD><DL> 394<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true#hasNext()" title="class or interface in java.util">hasNext</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#hasNext()" title="class or interface in java.util">hasNext</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE></DL> 395</DD> 396<DD><DL> 397 398<DT><B>Returns:</B><DD>whether <A HREF="../../../com/sleepycat/collections/StoredIterator.html#next()"><CODE>next()</CODE></A> will succeed. 399<DT><B>Throws:</B> 400<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.</DL> 401</DD> 402</DL> 403<HR> 404 405<A NAME="hasPrevious()"><!-- --></A><H3> 406hasPrevious</H3> 407<PRE> 408public boolean <B>hasPrevious</B>()</PRE> 409<DL> 410<DD>Returns true if this iterator has more elements when traversing in the 411 reverse direction. It returns false if the iterator has been closed. 412 This method conforms to the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#hasPrevious()" title="class or interface in java.util"><CODE>ListIterator.hasPrevious()</CODE></A> interface. 413<P> 414<DD><DL> 415<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#hasPrevious()" title="class or interface in java.util">hasPrevious</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE></DL> 416</DD> 417<DD><DL> 418 419<DT><B>Returns:</B><DD>whether <A HREF="../../../com/sleepycat/collections/StoredIterator.html#previous()"><CODE>previous()</CODE></A> will succeed. 420<DT><B>Throws:</B> 421<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.</DL> 422</DD> 423</DL> 424<HR> 425 426<A NAME="next()"><!-- --></A><H3> 427next</H3> 428<PRE> 429public <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A> <B>next</B>()</PRE> 430<DL> 431<DD>Returns the next element in the iteration. 432 This method conforms to the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true#next()" title="class or interface in java.util"><CODE>Iterator.next()</CODE></A> interface. 433<P> 434<DD><DL> 435<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true#next()" title="class or interface in java.util">next</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#next()" title="class or interface in java.util">next</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE></DL> 436</DD> 437<DD><DL> 438 439<DT><B>Returns:</B><DD>the next element. 440<DT><B>Throws:</B> 441<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is 442 thrown.</DL> 443</DD> 444</DL> 445<HR> 446 447<A NAME="previous()"><!-- --></A><H3> 448previous</H3> 449<PRE> 450public <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A> <B>previous</B>()</PRE> 451<DL> 452<DD>Returns the next element in the iteration. 453 This method conforms to the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#previous()" title="class or interface in java.util"><CODE>ListIterator.previous()</CODE></A> interface. 454<P> 455<DD><DL> 456<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#previous()" title="class or interface in java.util">previous</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE></DL> 457</DD> 458<DD><DL> 459 460<DT><B>Returns:</B><DD>the previous element. 461<DT><B>Throws:</B> 462<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is 463 thrown.</DL> 464</DD> 465</DL> 466<HR> 467 468<A NAME="nextIndex()"><!-- --></A><H3> 469nextIndex</H3> 470<PRE> 471public int <B>nextIndex</B>()</PRE> 472<DL> 473<DD>Returns the index of the element that would be returned by a subsequent 474 call to next. 475 This method conforms to the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#nextIndex()" title="class or interface in java.util"><CODE>ListIterator.nextIndex()</CODE></A> interface 476 except that it returns Integer.MAX_VALUE for stored lists when 477 positioned at the end of the list, rather than returning the list size 478 as specified by the ListIterator interface. This is because the database 479 size is not available. 480<P> 481<DD><DL> 482<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#nextIndex()" title="class or interface in java.util">nextIndex</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE></DL> 483</DD> 484<DD><DL> 485 486<DT><B>Returns:</B><DD>the next index. 487<DT><B>Throws:</B> 488<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if this iterator's collection does 489 not use record number keys. 490<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is 491 thrown.</DL> 492</DD> 493</DL> 494<HR> 495 496<A NAME="previousIndex()"><!-- --></A><H3> 497previousIndex</H3> 498<PRE> 499public int <B>previousIndex</B>()</PRE> 500<DL> 501<DD>Returns the index of the element that would be returned by a subsequent 502 call to previous. 503 This method conforms to the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#previousIndex()" title="class or interface in java.util"><CODE>ListIterator.previousIndex()</CODE></A> 504 interface. 505<P> 506<DD><DL> 507<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#previousIndex()" title="class or interface in java.util">previousIndex</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE></DL> 508</DD> 509<DD><DL> 510 511<DT><B>Returns:</B><DD>the previous index. 512<DT><B>Throws:</B> 513<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if this iterator's collection does 514 not use record number keys. 515<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is 516 thrown.</DL> 517</DD> 518</DL> 519<HR> 520 521<A NAME="set(java.lang.Object)"><!-- --></A><A NAME="set(E)"><!-- --></A><H3> 522set</H3> 523<PRE> 524public void <B>set</B>(<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A> value)</PRE> 525<DL> 526<DD>Replaces the last element returned by next or previous with the 527 specified element (optional operation). 528 This method conforms to the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#set(E)" title="class or interface in java.util"><CODE>ListIterator.set(E)</CODE></A> interface. 529 530 <p>In order to call this method, if the underlying Database is 531 transactional then a transaction must be active when creating the 532 iterator.</p> 533<P> 534<DD><DL> 535<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#set(E)" title="class or interface in java.util">set</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE></DL> 536</DD> 537<DD><DL> 538<DT><B>Parameters:</B><DD><CODE>value</CODE> - the new value. 539<DT><B>Throws:</B> 540<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the collection is a <A HREF="../../../com/sleepycat/collections/StoredKeySet.html" title="class in com.sleepycat.collections"><CODE>StoredKeySet</CODE></A> (the set returned by <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true#keySet()" title="class or interface in java.util"><CODE>Map.keySet()</CODE></A>), or if 541 duplicates are sorted since this would change the iterator position, or 542 if the collection is indexed, or if the collection is read-only. 543<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an entity value binding is used and 544 the primary key of the value given is different than the existing stored 545 primary key. 546<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is 547 thrown.</DL> 548</DD> 549</DL> 550<HR> 551 552<A NAME="remove()"><!-- --></A><H3> 553remove</H3> 554<PRE> 555public void <B>remove</B>()</PRE> 556<DL> 557<DD>Removes the last element that was returned by next or previous (optional 558 operation). 559 This method conforms to the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#remove()" title="class or interface in java.util"><CODE>ListIterator.remove()</CODE></A> interface except 560 that when the collection is a list and the RECNO-RENUMBER access method 561 is not used, list indices will not be renumbered. 562 563 <p>In order to call this method, if the underlying Database is 564 transactional then a transaction must be active when creating the 565 iterator.</p> 566 567 <p>Note that for the JE product, RECNO-RENUMBER databases are not 568 supported, and therefore list indices are never renumbered by this 569 method.</p> 570<P> 571<DD><DL> 572<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true#remove()" title="class or interface in java.util">remove</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#remove()" title="class or interface in java.util">remove</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE></DL> 573</DD> 574<DD><DL> 575 576<DT><B>Throws:</B> 577<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the collection is a sublist, or 578 if the collection is read-only. 579<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is 580 thrown.</DL> 581</DD> 582</DL> 583<HR> 584 585<A NAME="add(java.lang.Object)"><!-- --></A><A NAME="add(E)"><!-- --></A><H3> 586add</H3> 587<PRE> 588public void <B>add</B>(<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A> value)</PRE> 589<DL> 590<DD>Inserts the specified element into the list or inserts a duplicate into 591 other types of collections (optional operation). 592 This method conforms to the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#add(E)" title="class or interface in java.util"><CODE>ListIterator.add(E)</CODE></A> interface when 593 the collection is a list and the RECNO-RENUMBER access method is used. 594 Otherwise, this method may only be called when duplicates are allowed. 595 If duplicates are unsorted, the new value will be inserted in the same 596 manner as list elements. 597 If duplicates are sorted, the new value will be inserted in sort order. 598 599 <p>Note that for the JE product, RECNO-RENUMBER databases are not 600 supported, and therefore this method may only be used to add 601 duplicates.</p> 602<P> 603<DD><DL> 604<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true#add(E)" title="class or interface in java.util">add</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>></CODE></DL> 605</DD> 606<DD><DL> 607<DT><B>Parameters:</B><DD><CODE>value</CODE> - the new value. 608<DT><B>Throws:</B> 609<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the collection is a sublist, or 610 if the collection is indexed, or if the collection is read-only, or if 611 the collection is a list and the RECNO-RENUMBER access method was not 612 used, or if the collection is not a list and duplicates are not allowed. 613<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the collection is empty and is not a 614 list with RECNO-RENUMBER access. 615<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if a duplicate value is being added 616 that already exists and duplicates are sorted. 617<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is 618 thrown.</DL> 619</DD> 620</DL> 621<HR> 622 623<A NAME="count()"><!-- --></A><H3> 624count</H3> 625<PRE> 626public int <B>count</B>()</PRE> 627<DL> 628<DD>Returns the number of elements having the same key value as the key 629 value of the element last returned by next() or previous(). If no 630 duplicates are allowed, 1 is always returned. 631 This method does not exist in the standard <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><CODE>Iterator</CODE></A> or <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util"><CODE>ListIterator</CODE></A> interfaces. 632<P> 633<DD><DL> 634</DL> 635</DD> 636<DD><DL> 637 638<DT><B>Returns:</B><DD>the number of duplicates. 639<DT><B>Throws:</B> 640<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if next() or previous() has not been 641 called for this iterator, or if remove() or add() were called after 642 the last call to next() or previous().</DL> 643</DD> 644</DL> 645<HR> 646 647<A NAME="close()"><!-- --></A><H3> 648close</H3> 649<PRE> 650public void <B>close</B>()</PRE> 651<DL> 652<DD>Closes this iterator. 653 This method does not exist in the standard <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><CODE>Iterator</CODE></A> or <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util"><CODE>ListIterator</CODE></A> interfaces. 654 655 <p>After being closed, only the <A HREF="../../../com/sleepycat/collections/StoredIterator.html#hasNext()"><CODE>hasNext()</CODE></A> and <A HREF="../../../com/sleepycat/collections/StoredIterator.html#hasPrevious()"><CODE>hasPrevious()</CODE></A> methods may be called and these will return false. <A HREF="../../../com/sleepycat/collections/StoredIterator.html#close()"><CODE>close()</CODE></A> may also be called again and will do nothing. If other 656 methods are called a <code>NullPointerException</code> will generally be 657 thrown.</p> 658<P> 659<DD><DL> 660</DL> 661</DD> 662<DD><DL> 663 664<DT><B>Throws:</B> 665<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is 666 thrown.</DL> 667</DD> 668</DL> 669<HR> 670 671<A NAME="getCollection()"><!-- --></A><H3> 672getCollection</H3> 673<PRE> 674public final <A HREF="../../../com/sleepycat/collections/StoredCollection.html" title="class in com.sleepycat.collections">StoredCollection</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>> <B>getCollection</B>()</PRE> 675<DL> 676<DD>Returns the collection associated with this iterator. 677 This method does not exist in the standard <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><CODE>Iterator</CODE></A> or <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util"><CODE>ListIterator</CODE></A> interfaces. 678<P> 679<DD><DL> 680</DL> 681</DD> 682<DD><DL> 683 684<DT><B>Returns:</B><DD>the collection associated with this iterator.</DL> 685</DD> 686</DL> 687<HR> 688 689<A NAME="dup()"><!-- --></A><H3> 690dup</H3> 691<PRE> 692public final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</A><<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A>> <B>dup</B>()</PRE> 693<DL> 694<DD>Internal use only. 695<P> 696<DD><DL> 697</DL> 698</DD> 699<DD><DL> 700</DL> 701</DD> 702</DL> 703<HR> 704 705<A NAME="isCurrentData(java.lang.Object)"><!-- --></A><H3> 706isCurrentData</H3> 707<PRE> 708public final boolean <B>isCurrentData</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> currentData)</PRE> 709<DL> 710<DD>Internal use only. 711<P> 712<DD><DL> 713</DL> 714</DD> 715<DD><DL> 716</DL> 717</DD> 718</DL> 719<HR> 720 721<A NAME="moveToIndex(int)"><!-- --></A><H3> 722moveToIndex</H3> 723<PRE> 724public final boolean <B>moveToIndex</B>(int index)</PRE> 725<DL> 726<DD>Internal use only. 727<P> 728<DD><DL> 729</DL> 730</DD> 731<DD><DL> 732</DL> 733</DD> 734</DL> 735<!-- ========= END OF CLASS DATA ========= --> 736<HR> 737 738 739<!-- ======= START OF BOTTOM NAVBAR ====== --> 740<A NAME="navbar_bottom"><!-- --></A> 741<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 742<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 743<TR> 744<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 745<A NAME="navbar_bottom_firstrow"><!-- --></A> 746<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 747 <TR ALIGN="center" VALIGN="top"> 748 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 749 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 750 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 751 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/StoredIterator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 752 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 753 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 754 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 755 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 756 </TR> 757</TABLE> 758</TD> 759<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 760<b>Berkeley DB</b><br><font size="-1"> version 4.8.30</font></EM> 761</TD> 762</TR> 763 764<TR> 765<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 766 <A HREF="../../../com/sleepycat/collections/StoredEntrySet.html" title="class in com.sleepycat.collections"><B>PREV CLASS</B></A> 767 <A HREF="../../../com/sleepycat/collections/StoredKeySet.html" title="class in com.sleepycat.collections"><B>NEXT CLASS</B></A></FONT></TD> 768<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 769 <A HREF="../../../index.html?com/sleepycat/collections/StoredIterator.html" target="_top"><B>FRAMES</B></A> 770 <A HREF="StoredIterator.html" target="_top"><B>NO FRAMES</B></A> 771 <SCRIPT type="text/javascript"> 772 <!-- 773 if(window==top) { 774 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); 775 } 776 //--> 777</SCRIPT> 778<NOSCRIPT> 779 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> 780</NOSCRIPT> 781 782 783</FONT></TD> 784</TR> 785<TR> 786<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 787 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 788<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 789DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 790</TR> 791</TABLE> 792<A NAME="skip-navbar_bottom"></A> 793<!-- ======== END OF BOTTOM NAVBAR ======= --> 794 795<HR> 796<font size=1>Copyright (c) 1996-2009 Oracle. All rights reserved.</font> 797</BODY> 798</HTML> 799