| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 |
|
| 3 |
<HTML> |
| 4 |
<HEAD> |
| 5 |
|
| 6 |
<TITLE> |
| 7 |
StoredIterator (Oracle - Berkeley DB Java API) |
| 8 |
</TITLE> |
| 9 |
|
| 10 |
<META NAME="date" CONTENT="2013-09-09"> |
| 11 |
|
| 12 |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style"> |
| 13 |
|
| 14 |
<SCRIPT type="text/javascript"> |
| 15 |
function 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 |
|
| 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 5.3.28</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"> |
| 81 |
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| 82 |
</TR> |
| 83 |
</TABLE> |
| 84 |
<A NAME="skip-navbar_top"></A> |
| 85 |
|
| 86 |
|
| 87 |
<HR> |
| 88 |
|
| 89 |
<H2> |
| 90 |
<FONT SIZE="-1"> |
| 91 |
com.sleepycat.collections</FONT> |
| 92 |
<BR> |
| 93 |
Class StoredIterator<E></H2> |
| 94 |
<PRE> |
| 95 |
<A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/1.5.0/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</A>, <A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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> |
| 107 |
The Iterator returned by all stored collections. |
| 108 |
|
| 109 |
<p>While in general this class conforms to the <A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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 |
|
| 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://download.oracle.com/javase/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="../../../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> |
| 186 |
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#getCollection()">getCollection</A></B>()</CODE> |
| 187 |
|
| 188 |
<BR> |
| 189 |
Returns the collection associated with this iterator.</TD> |
| 190 |
</TR> |
| 191 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 192 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 193 |
<CODE> boolean</CODE></FONT></TD> |
| 194 |
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#hasNext()">hasNext</A></B>()</CODE> |
| 195 |
|
| 196 |
<BR> |
| 197 |
Returns true if this iterator has more elements when traversing in the |
| 198 |
forward direction.</TD> |
| 199 |
</TR> |
| 200 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 201 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 202 |
<CODE> boolean</CODE></FONT></TD> |
| 203 |
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#hasPrevious()">hasPrevious</A></B>()</CODE> |
| 204 |
|
| 205 |
<BR> |
| 206 |
Returns true if this iterator has more elements when traversing in the |
| 207 |
reverse direction.</TD> |
| 208 |
</TR> |
| 209 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 210 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 211 |
<CODE> boolean</CODE></FONT></TD> |
| 212 |
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#isReadModifyWrite()">isReadModifyWrite</A></B>()</CODE> |
| 213 |
|
| 214 |
<BR> |
| 215 |
Returns whether write-locks will be obtained when reading with this |
| 216 |
cursor.</TD> |
| 217 |
</TR> |
| 218 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 219 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 220 |
<CODE> <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A></CODE></FONT></TD> |
| 221 |
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#next()">next</A></B>()</CODE> |
| 222 |
|
| 223 |
<BR> |
| 224 |
Returns the next element in the iteration.</TD> |
| 225 |
</TR> |
| 226 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 227 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 228 |
<CODE> int</CODE></FONT></TD> |
| 229 |
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#nextIndex()">nextIndex</A></B>()</CODE> |
| 230 |
|
| 231 |
<BR> |
| 232 |
Returns the index of the element that would be returned by a subsequent |
| 233 |
call to next.</TD> |
| 234 |
</TR> |
| 235 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 236 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 237 |
<CODE> <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A></CODE></FONT></TD> |
| 238 |
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#previous()">previous</A></B>()</CODE> |
| 239 |
|
| 240 |
<BR> |
| 241 |
Returns the next element in the iteration.</TD> |
| 242 |
</TR> |
| 243 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 244 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 245 |
<CODE> int</CODE></FONT></TD> |
| 246 |
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#previousIndex()">previousIndex</A></B>()</CODE> |
| 247 |
|
| 248 |
<BR> |
| 249 |
Returns the index of the element that would be returned by a subsequent |
| 250 |
call to previous.</TD> |
| 251 |
</TR> |
| 252 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 253 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 254 |
<CODE> void</CODE></FONT></TD> |
| 255 |
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#remove()">remove</A></B>()</CODE> |
| 256 |
|
| 257 |
<BR> |
| 258 |
Removes the last element that was returned by next or previous (optional |
| 259 |
operation).</TD> |
| 260 |
</TR> |
| 261 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 262 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 263 |
<CODE> void</CODE></FONT></TD> |
| 264 |
<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> |
| 265 |
|
| 266 |
<BR> |
| 267 |
Replaces the last element returned by next or previous with the |
| 268 |
specified element (optional operation).</TD> |
| 269 |
</TR> |
| 270 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 271 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 272 |
<CODE> void</CODE></FONT></TD> |
| 273 |
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredIterator.html#setReadModifyWrite(boolean)">setReadModifyWrite</A></B>(boolean lockForWrite)</CODE> |
| 274 |
|
| 275 |
<BR> |
| 276 |
Changes whether write-locks will be obtained when reading with this |
| 277 |
cursor.</TD> |
| 278 |
</TR> |
| 279 |
</TABLE> |
| 280 |
<A NAME="methods_inherited_from_class_java.lang.Object"></A> |
| 281 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| 282 |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| 283 |
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> |
| 284 |
</TR> |
| 285 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 286 |
<TD><CODE><A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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> |
| 287 |
</TR> |
| 288 |
</TABLE> |
| 289 |
|
| 290 |
<P> |
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
<A NAME="method_detail"></A> |
| 295 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| 296 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| 297 |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| 298 |
<B>Method Detail</B></FONT></TH> |
| 299 |
</TR> |
| 300 |
</TABLE> |
| 301 |
|
| 302 |
<A NAME="close(java.util.Iterator)"></A><H3> |
| 303 |
close</H3> |
| 304 |
<PRE> |
| 305 |
public static void <B>close</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><?> i)</PRE> |
| 306 |
<DL> |
| 307 |
<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>, |
| 308 |
this method does nothing. |
| 309 |
<P> |
| 310 |
<DD><DL> |
| 311 |
</DL> |
| 312 |
</DD> |
| 313 |
<DD><DL> |
| 314 |
<DT><B>Parameters:</B><DD><CODE>i</CODE> - is the iterator to close. |
| 315 |
<DT><B>Throws:</B> |
| 316 |
<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a checked exception is thrown, |
| 317 |
including a <code>DatabaseException</code> on BDB (C edition).</DL> |
| 318 |
</DD> |
| 319 |
</DL> |
| 320 |
<HR> |
| 321 |
|
| 322 |
<A NAME="isReadModifyWrite()"></A><H3> |
| 323 |
isReadModifyWrite</H3> |
| 324 |
<PRE> |
| 325 |
public final boolean <B>isReadModifyWrite</B>()</PRE> |
| 326 |
<DL> |
| 327 |
<DD>Returns whether write-locks will be obtained when reading with this |
| 328 |
cursor. |
| 329 |
Obtaining write-locks can prevent deadlocks when reading and then |
| 330 |
modifying data. |
| 331 |
<P> |
| 332 |
<DD><DL> |
| 333 |
</DL> |
| 334 |
</DD> |
| 335 |
<DD><DL> |
| 336 |
|
| 337 |
<DT><B>Returns:</B><DD>the write-lock setting.</DL> |
| 338 |
</DD> |
| 339 |
</DL> |
| 340 |
<HR> |
| 341 |
|
| 342 |
<A NAME="setReadModifyWrite(boolean)"></A><H3> |
| 343 |
setReadModifyWrite</H3> |
| 344 |
<PRE> |
| 345 |
public void <B>setReadModifyWrite</B>(boolean lockForWrite)</PRE> |
| 346 |
<DL> |
| 347 |
<DD>Changes whether write-locks will be obtained when reading with this |
| 348 |
cursor. |
| 349 |
Obtaining write-locks can prevent deadlocks when reading and then |
| 350 |
modifying data. |
| 351 |
<P> |
| 352 |
<DD><DL> |
| 353 |
</DL> |
| 354 |
</DD> |
| 355 |
<DD><DL> |
| 356 |
<DT><B>Parameters:</B><DD><CODE>lockForWrite</CODE> - the write-lock setting.</DL> |
| 357 |
</DD> |
| 358 |
</DL> |
| 359 |
<HR> |
| 360 |
|
| 361 |
<A NAME="hasNext()"></A><H3> |
| 362 |
hasNext</H3> |
| 363 |
<PRE> |
| 364 |
public boolean <B>hasNext</B>()</PRE> |
| 365 |
<DL> |
| 366 |
<DD>Returns true if this iterator has more elements when traversing in the |
| 367 |
forward direction. False is returned if the iterator has been closed. |
| 368 |
This method conforms to the <A HREF="http://download.oracle.com/javase/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. |
| 369 |
<P> |
| 370 |
<DD><DL> |
| 371 |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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> |
| 372 |
</DD> |
| 373 |
<DD><DL> |
| 374 |
|
| 375 |
<DT><B>Returns:</B><DD>whether <A HREF="../../../com/sleepycat/collections/StoredIterator.html#next()"><CODE>next()</CODE></A> will succeed. |
| 376 |
<DT><B>Throws:</B> |
| 377 |
<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a checked exception is thrown, |
| 378 |
including a <code>DatabaseException</code> on BDB (C edition).</DL> |
| 379 |
</DD> |
| 380 |
</DL> |
| 381 |
<HR> |
| 382 |
|
| 383 |
<A NAME="hasPrevious()"></A><H3> |
| 384 |
hasPrevious</H3> |
| 385 |
<PRE> |
| 386 |
public boolean <B>hasPrevious</B>()</PRE> |
| 387 |
<DL> |
| 388 |
<DD>Returns true if this iterator has more elements when traversing in the |
| 389 |
reverse direction. It returns false if the iterator has been closed. |
| 390 |
This method conforms to the <A HREF="http://download.oracle.com/javase/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. |
| 391 |
<P> |
| 392 |
<DD><DL> |
| 393 |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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> |
| 394 |
</DD> |
| 395 |
<DD><DL> |
| 396 |
|
| 397 |
<DT><B>Returns:</B><DD>whether <A HREF="../../../com/sleepycat/collections/StoredIterator.html#previous()"><CODE>previous()</CODE></A> will succeed. |
| 398 |
<DT><B>Throws:</B> |
| 399 |
<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a checked exception is thrown, |
| 400 |
including a <code>DatabaseException</code> on BDB (C edition).</DL> |
| 401 |
</DD> |
| 402 |
</DL> |
| 403 |
<HR> |
| 404 |
|
| 405 |
<A NAME="next()"></A><H3> |
| 406 |
next</H3> |
| 407 |
<PRE> |
| 408 |
public <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A> <B>next</B>()</PRE> |
| 409 |
<DL> |
| 410 |
<DD>Returns the next element in the iteration. |
| 411 |
This method conforms to the <A HREF="http://download.oracle.com/javase/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. |
| 412 |
<P> |
| 413 |
<DD><DL> |
| 414 |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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> |
| 415 |
</DD> |
| 416 |
<DD><DL> |
| 417 |
|
| 418 |
<DT><B>Returns:</B><DD>the next element. |
| 419 |
<DT><B>Throws:</B> |
| 420 |
<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a checked exception is thrown, |
| 421 |
including a <code>DatabaseException</code> on BDB (C Edition).</DL> |
| 422 |
</DD> |
| 423 |
</DL> |
| 424 |
<HR> |
| 425 |
|
| 426 |
<A NAME="previous()"></A><H3> |
| 427 |
previous</H3> |
| 428 |
<PRE> |
| 429 |
public <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A> <B>previous</B>()</PRE> |
| 430 |
<DL> |
| 431 |
<DD>Returns the next element in the iteration. |
| 432 |
This method conforms to the <A HREF="http://download.oracle.com/javase/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. |
| 433 |
<P> |
| 434 |
<DD><DL> |
| 435 |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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 previous 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 checked exception is thrown, |
| 442 |
including a <code>DatabaseException</code> on BDB (C Edition).</DL> |
| 443 |
</DD> |
| 444 |
</DL> |
| 445 |
<HR> |
| 446 |
|
| 447 |
<A NAME="nextIndex()"></A><H3> |
| 448 |
nextIndex</H3> |
| 449 |
<PRE> |
| 450 |
public int <B>nextIndex</B>()</PRE> |
| 451 |
<DL> |
| 452 |
<DD>Returns the index of the element that would be returned by a subsequent |
| 453 |
call to next. |
| 454 |
This method conforms to the <A HREF="http://download.oracle.com/javase/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 |
| 455 |
except that it returns Integer.MAX_VALUE for stored lists when |
| 456 |
positioned at the end of the list, rather than returning the list size |
| 457 |
as specified by the ListIterator interface. This is because the database |
| 458 |
size is not available. |
| 459 |
<P> |
| 460 |
<DD><DL> |
| 461 |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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> |
| 462 |
</DD> |
| 463 |
<DD><DL> |
| 464 |
|
| 465 |
<DT><B>Returns:</B><DD>the next index. |
| 466 |
<DT><B>Throws:</B> |
| 467 |
<DD><CODE><A HREF="http://download.oracle.com/javase/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 |
| 468 |
not use record number keys. |
| 469 |
<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a checked exception is thrown, |
| 470 |
including a <code>DatabaseException</code> on BDB (C Edition).</DL> |
| 471 |
</DD> |
| 472 |
</DL> |
| 473 |
<HR> |
| 474 |
|
| 475 |
<A NAME="previousIndex()"></A><H3> |
| 476 |
previousIndex</H3> |
| 477 |
<PRE> |
| 478 |
public int <B>previousIndex</B>()</PRE> |
| 479 |
<DL> |
| 480 |
<DD>Returns the index of the element that would be returned by a subsequent |
| 481 |
call to previous. |
| 482 |
This method conforms to the <A HREF="http://download.oracle.com/javase/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> |
| 483 |
interface. |
| 484 |
<P> |
| 485 |
<DD><DL> |
| 486 |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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> |
| 487 |
</DD> |
| 488 |
<DD><DL> |
| 489 |
|
| 490 |
<DT><B>Returns:</B><DD>the previous index. |
| 491 |
<DT><B>Throws:</B> |
| 492 |
<DD><CODE><A HREF="http://download.oracle.com/javase/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 |
| 493 |
not use record number keys. |
| 494 |
<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a checked exception is thrown, |
| 495 |
including a <code>DatabaseException</code> on BDB (C Edition).</DL> |
| 496 |
</DD> |
| 497 |
</DL> |
| 498 |
<HR> |
| 499 |
|
| 500 |
<A NAME="set(java.lang.Object)"></A><A NAME="set(E)"></A><H3> |
| 501 |
set</H3> |
| 502 |
<PRE> |
| 503 |
public void <B>set</B>(<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A> value)</PRE> |
| 504 |
<DL> |
| 505 |
<DD>Replaces the last element returned by next or previous with the |
| 506 |
specified element (optional operation). |
| 507 |
This method conforms to the <A HREF="http://download.oracle.com/javase/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. |
| 508 |
|
| 509 |
<p>In order to call this method, if the underlying Database is |
| 510 |
transactional then a transaction must be active when creating the |
| 511 |
iterator.</p> |
| 512 |
<P> |
| 513 |
<DD><DL> |
| 514 |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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> |
| 515 |
</DD> |
| 516 |
<DD><DL> |
| 517 |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the new value. |
| 518 |
<DT><B>Throws:</B> |
| 519 |
<DD><CODE><A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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 |
| 520 |
duplicates are sorted since this would change the iterator position, or |
| 521 |
if the collection is indexed, or if the collection is read-only. |
| 522 |
<DD><CODE><A HREF="http://download.oracle.com/javase/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 |
| 523 |
the primary key of the value given is different than the existing stored |
| 524 |
primary key. |
| 525 |
<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a checked exception is thrown, |
| 526 |
including a <code>DatabaseException</code> on BDB (C Edition).</DL> |
| 527 |
</DD> |
| 528 |
</DL> |
| 529 |
<HR> |
| 530 |
|
| 531 |
<A NAME="remove()"></A><H3> |
| 532 |
remove</H3> |
| 533 |
<PRE> |
| 534 |
public void <B>remove</B>()</PRE> |
| 535 |
<DL> |
| 536 |
<DD>Removes the last element that was returned by next or previous (optional |
| 537 |
operation). |
| 538 |
This method conforms to the <A HREF="http://download.oracle.com/javase/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 |
| 539 |
that when the collection is a list and the RECNO-RENUMBER access method |
| 540 |
is not used, list indices will not be renumbered. |
| 541 |
|
| 542 |
<p>In order to call this method, if the underlying Database is |
| 543 |
transactional then a transaction must be active when creating the |
| 544 |
iterator.</p> |
| 545 |
|
| 546 |
<p>Note that for the JE product, RECNO-RENUMBER databases are not |
| 547 |
supported, and therefore list indices are never renumbered by this |
| 548 |
method.</p> |
| 549 |
<P> |
| 550 |
<DD><DL> |
| 551 |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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> |
| 552 |
</DD> |
| 553 |
<DD><DL> |
| 554 |
|
| 555 |
<DT><B>Throws:</B> |
| 556 |
<DD><CODE><A HREF="http://download.oracle.com/javase/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 |
| 557 |
if the collection is read-only. |
| 558 |
<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a checked exception is thrown, |
| 559 |
including a <code>DatabaseException</code> on BDB (C Edition).</DL> |
| 560 |
</DD> |
| 561 |
</DL> |
| 562 |
<HR> |
| 563 |
|
| 564 |
<A NAME="add(java.lang.Object)"></A><A NAME="add(E)"></A><H3> |
| 565 |
add</H3> |
| 566 |
<PRE> |
| 567 |
public void <B>add</B>(<A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="type parameter in StoredIterator">E</A> value)</PRE> |
| 568 |
<DL> |
| 569 |
<DD>Inserts the specified element into the list or inserts a duplicate into |
| 570 |
other types of collections (optional operation). |
| 571 |
This method conforms to the <A HREF="http://download.oracle.com/javase/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 |
| 572 |
the collection is a list and the RECNO-RENUMBER access method is used. |
| 573 |
Otherwise, this method may only be called when duplicates are allowed. |
| 574 |
If duplicates are unsorted, the new value will be inserted in the same |
| 575 |
manner as list elements. |
| 576 |
If duplicates are sorted, the new value will be inserted in sort order. |
| 577 |
|
| 578 |
<p>Note that for the JE product, RECNO-RENUMBER databases are not |
| 579 |
supported, and therefore this method may only be used to add |
| 580 |
duplicates.</p> |
| 581 |
<P> |
| 582 |
<DD><DL> |
| 583 |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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> |
| 584 |
</DD> |
| 585 |
<DD><DL> |
| 586 |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the new value. |
| 587 |
<DT><B>Throws:</B> |
| 588 |
<DD><CODE><A HREF="http://download.oracle.com/javase/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 |
| 589 |
if the collection is indexed, or if the collection is read-only, or if |
| 590 |
the collection is a list and the RECNO-RENUMBER access method was not |
| 591 |
used, or if the collection is not a list and duplicates are not allowed. |
| 592 |
<DD><CODE><A HREF="http://download.oracle.com/javase/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 |
| 593 |
list with RECNO-RENUMBER access. |
| 594 |
<DD><CODE><A HREF="http://download.oracle.com/javase/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 |
| 595 |
that already exists and duplicates are sorted. |
| 596 |
<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a checked exception is thrown, |
| 597 |
including a <code>DatabaseException</code> on BDB (C Edition).</DL> |
| 598 |
</DD> |
| 599 |
</DL> |
| 600 |
<HR> |
| 601 |
|
| 602 |
<A NAME="count()"></A><H3> |
| 603 |
count</H3> |
| 604 |
<PRE> |
| 605 |
public int <B>count</B>()</PRE> |
| 606 |
<DL> |
| 607 |
<DD>Returns the number of elements having the same key value as the key |
| 608 |
value of the element last returned by next() or previous(). If no |
| 609 |
duplicates are allowed, 1 is always returned. |
| 610 |
This method does not exist in the standard <A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util"><CODE>ListIterator</CODE></A> interfaces. |
| 611 |
<P> |
| 612 |
<DD><DL> |
| 613 |
</DL> |
| 614 |
</DD> |
| 615 |
<DD><DL> |
| 616 |
|
| 617 |
<DT><B>Returns:</B><DD>the number of duplicates. |
| 618 |
<DT><B>Throws:</B> |
| 619 |
<DD><CODE><A HREF="http://download.oracle.com/javase/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 |
| 620 |
called for this iterator, or if remove() or add() were called after |
| 621 |
the last call to next() or previous().</DL> |
| 622 |
</DD> |
| 623 |
</DL> |
| 624 |
<HR> |
| 625 |
|
| 626 |
<A NAME="close()"></A><H3> |
| 627 |
close</H3> |
| 628 |
<PRE> |
| 629 |
public void <B>close</B>()</PRE> |
| 630 |
<DL> |
| 631 |
<DD>Closes this iterator. |
| 632 |
This method does not exist in the standard <A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util"><CODE>ListIterator</CODE></A> interfaces. |
| 633 |
|
| 634 |
<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 |
| 635 |
methods are called a <code>NullPointerException</code> will generally be |
| 636 |
thrown.</p> |
| 637 |
<P> |
| 638 |
<DD><DL> |
| 639 |
</DL> |
| 640 |
</DD> |
| 641 |
<DD><DL> |
| 642 |
|
| 643 |
<DT><B>Throws:</B> |
| 644 |
<DD><CODE><A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util">RuntimeExceptionWrapper</A></CODE> - if a checked exception is thrown, |
| 645 |
including a <code>DatabaseException</code> on BDB (C Edition).</DL> |
| 646 |
</DD> |
| 647 |
</DL> |
| 648 |
<HR> |
| 649 |
|
| 650 |
<A NAME="getCollection()"></A><H3> |
| 651 |
getCollection</H3> |
| 652 |
<PRE> |
| 653 |
public 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> |
| 654 |
<DL> |
| 655 |
<DD>Returns the collection associated with this iterator. |
| 656 |
This method does not exist in the standard <A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/1.5.0/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util"><CODE>ListIterator</CODE></A> interfaces. |
| 657 |
<P> |
| 658 |
<DD><DL> |
| 659 |
</DL> |
| 660 |
</DD> |
| 661 |
<DD><DL> |
| 662 |
|
| 663 |
<DT><B>Returns:</B><DD>the collection associated with this iterator.</DL> |
| 664 |
</DD> |
| 665 |
</DL> |
| 666 |
|
| 667 |
<HR> |
| 668 |
|
| 669 |
|
| 670 |
|
| 671 |
<A NAME="navbar_bottom"></A> |
| 672 |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| 673 |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| 674 |
<TR> |
| 675 |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| 676 |
<A NAME="navbar_bottom_firstrow"></A> |
| 677 |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| 678 |
<TR ALIGN="center" VALIGN="top"> |
| 679 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| 680 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| 681 |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| 682 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/StoredIterator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| 683 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| 684 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| 685 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| 686 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| 687 |
</TR> |
| 688 |
</TABLE> |
| 689 |
</TD> |
| 690 |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| 691 |
<b>Berkeley DB</b><br><font size="-1"> version 5.3.28</font></EM> |
| 692 |
</TD> |
| 693 |
</TR> |
| 694 |
|
| 695 |
<TR> |
| 696 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| 697 |
<A HREF="../../../com/sleepycat/collections/StoredEntrySet.html" title="class in com.sleepycat.collections"><B>PREV CLASS</B></A> |
| 698 |
<A HREF="../../../com/sleepycat/collections/StoredKeySet.html" title="class in com.sleepycat.collections"><B>NEXT CLASS</B></A></FONT></TD> |
| 699 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| 700 |
<A HREF="../../../index.html?com/sleepycat/collections/StoredIterator.html" target="_top"><B>FRAMES</B></A> |
| 701 |
<A HREF="StoredIterator.html" target="_top"><B>NO FRAMES</B></A> |
| 702 |
<SCRIPT type="text/javascript"> |
| 703 |
<!-- |
| 704 |
if(window==top) { |
| 705 |
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| 706 |
} |
| 707 |
//--> |
| 708 |
</SCRIPT> |
| 709 |
<NOSCRIPT> |
| 710 |
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> |
| 711 |
</NOSCRIPT> |
| 712 |
|
| 713 |
|
| 714 |
</FONT></TD> |
| 715 |
</TR> |
| 716 |
<TR> |
| 717 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| 718 |
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| 719 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| 720 |
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| 721 |
</TR> |
| 722 |
</TABLE> |
| 723 |
<A NAME="skip-navbar_bottom"></A> |
| 724 |
|
| 725 |
|
| 726 |
<HR> |
| 727 |
<font size=1>Copyright (c) 1996, 2013 Oracle and/or its affiliates. All rights reserved.</font> |
| 728 |
</BODY> |
| 729 |
</HTML> |