<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_17) on Sun Mar 14 17:34:24 UTC 2010 --> <TITLE> StoredCollection </TITLE> <META NAME="date" CONTENT="2010-03-14"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="StoredCollection"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/sleepycat/collections/PrimaryKeyAssigner.html" title="interface in com.sleepycat.collections"><B>PREV CLASS</B></A> <A HREF="../../../com/sleepycat/collections/StoredCollections.html" title="class in com.sleepycat.collections"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/sleepycat/collections/StoredCollection.html" target="_top"><B>FRAMES</B></A> <A HREF="StoredCollection.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.sleepycat.collections</FONT> <BR> Class StoredCollection</H2> <PRE> java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/sleepycat/collections/StoredContainer.html" title="class in com.sleepycat.collections">com.sleepycat.collections.StoredContainer</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.sleepycat.collections.StoredCollection</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable, java.lang.Iterable, java.util.Collection</DD> </DL> <DL> <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/sleepycat/collections/StoredEntrySet.html" title="class in com.sleepycat.collections">StoredEntrySet</A>, <A HREF="../../../com/sleepycat/collections/StoredKeySet.html" title="class in com.sleepycat.collections">StoredKeySet</A>, <A HREF="../../../com/sleepycat/collections/StoredList.html" title="class in com.sleepycat.collections">StoredList</A>, <A HREF="../../../com/sleepycat/collections/StoredValueSet.html" title="class in com.sleepycat.collections">StoredValueSet</A></DD> </DL> <HR> <DL> <DT><PRE>public abstract class <B>StoredCollection</B><DT>extends <A HREF="../../../com/sleepycat/collections/StoredContainer.html" title="class in com.sleepycat.collections">StoredContainer</A><DT>implements java.util.Collection</DL> </PRE> <P> A abstract base class for all stored collections. This class, and its base class <A HREF="../../../com/sleepycat/collections/StoredContainer.html" title="class in com.sleepycat.collections"><CODE>StoredContainer</CODE></A>, provide implementations of most methods in the <CODE>Collection</CODE> interface. Other methods, such as <A HREF="../../../com/sleepycat/collections/StoredCollection.html#add(java.lang.Object, java.lang.Object)"><CODE>add(java.lang.Object, java.lang.Object)</CODE></A> and <CODE>Collection.remove(java.lang.Object)</CODE>, are provided by concrete classes that extend this class. <p>In addition, this class provides the following methods for stored collections only. Note that the use of these methods is not compatible with the standard Java collections interface.</p> <ul> <li><A HREF="../../../com/sleepycat/collections/StoredCollection.html#getIteratorBlockSize()"><CODE>getIteratorBlockSize()</CODE></A></li> <li><A HREF="../../../com/sleepycat/collections/StoredCollection.html#setIteratorBlockSize(int)"><CODE>setIteratorBlockSize(int)</CODE></A></li> <li><A HREF="../../../com/sleepycat/collections/StoredCollection.html#storedIterator()"><CODE>storedIterator()</CODE></A></li> <li><A HREF="../../../com/sleepycat/collections/StoredCollection.html#storedIterator(boolean)"><CODE>storedIterator(boolean)</CODE></A></li> <li><A HREF="../../../com/sleepycat/collections/StoredCollection.html#join(com.sleepycat.collections.StoredContainer[], java.lang.Object[], com.sleepycat.db.JoinConfig)"><CODE>join(com.sleepycat.collections.StoredContainer[], java.lang.Object[], com.sleepycat.db.JoinConfig)</CODE></A></li> <li><A HREF="../../../com/sleepycat/collections/StoredCollection.html#toList()"><CODE>toList()</CODE></A></li> </ul> <P> <P> <HR> <P> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#DEFAULT_ITERATOR_BLOCK_SIZE">DEFAULT_ITERATOR_BLOCK_SIZE</A></B></CODE> <BR> The default number of records read at one time by iterators.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#addAll(java.util.Collection)">addAll</A></B>(java.util.Collection coll)</CODE> <BR> Adds all of the elements in the specified collection to this collection (optional operation).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#containsAll(java.util.Collection)">containsAll</A></B>(java.util.Collection coll)</CODE> <BR> Returns true if this collection contains all of the elements in the specified collection.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object other)</CODE> <BR> Compares the specified object with this collection for equality.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#getIteratorBlockSize()">getIteratorBlockSize</A></B>()</CODE> <BR> Returns the number of records read at one time by iterators returned by the <A HREF="../../../com/sleepycat/collections/StoredCollection.html#iterator()"><CODE>iterator()</CODE></A> method.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#hashCode()">hashCode</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.Iterator</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#iterator()">iterator</A></B>()</CODE> <BR> Returns an iterator over the elements in this collection.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="class in com.sleepycat.collections">StoredIterator</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#iterator(boolean)">iterator</A></B>(boolean writeAllowed)</CODE> <BR> <B>Deprecated.</B> <I>Please use <A HREF="../../../com/sleepycat/collections/StoredCollection.html#storedIterator()"><CODE>storedIterator()</CODE></A> or <A HREF="../../../com/sleepycat/collections/StoredCollection.html#storedIterator(boolean)"><CODE>storedIterator(boolean)</CODE></A> instead. Because the iterator returned must be closed, the method name <code>iterator</code> is confusing since standard Java iterators do not need to be closed.</I></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="class in com.sleepycat.collections">StoredIterator</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#join(com.sleepycat.collections.StoredContainer[], java.lang.Object[], com.sleepycat.db.JoinConfig)">join</A></B>(<A HREF="../../../com/sleepycat/collections/StoredContainer.html" title="class in com.sleepycat.collections">StoredContainer</A>[] indices, java.lang.Object[] indexKeys, <A HREF="../../../com/sleepycat/db/JoinConfig.html" title="class in com.sleepycat.db">JoinConfig</A> joinConfig)</CODE> <BR> Returns an iterator representing an equality join of the indices and index key values specified.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#removeAll(java.util.Collection)">removeAll</A></B>(java.util.Collection coll)</CODE> <BR> Removes all this collection's elements that are also contained in the specified collection (optional operation).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#retainAll(java.util.Collection)">retainAll</A></B>(java.util.Collection coll)</CODE> <BR> Retains only the elements in this collection that are contained in the specified collection (optional operation).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#setIteratorBlockSize(int)">setIteratorBlockSize</A></B>(int blockSize)</CODE> <BR> Changes the number of records read at one time by iterators returned by the <A HREF="../../../com/sleepycat/collections/StoredCollection.html#iterator()"><CODE>iterator()</CODE></A> method.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#size()">size</A></B>()</CODE> <BR> Returns a non-transactional count of the records in the collection or map.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="class in com.sleepycat.collections">StoredIterator</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#storedIterator()">storedIterator</A></B>()</CODE> <BR> Returns an iterator over the elements in this collection.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="class in com.sleepycat.collections">StoredIterator</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#storedIterator(boolean)">storedIterator</A></B>(boolean writeAllowed)</CODE> <BR> Returns a read or read-write iterator over the elements in this collection.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.Object[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#toArray()">toArray</A></B>()</CODE> <BR> Returns an array of all the elements in this collection.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.Object[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#toArray(java.lang.Object[])">toArray</A></B>(java.lang.Object[] a)</CODE> <BR> Returns an array of all the elements in this collection whose runtime type is that of the specified array.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.List</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#toList()">toList</A></B>()</CODE> <BR> Returns a copy of this collection as an ArrayList.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/collections/StoredCollection.html#toString()">toString</A></B>()</CODE> <BR> Converts the collection to a string representation for debugging.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_com.sleepycat.collections.StoredContainer"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class com.sleepycat.collections.<A HREF="../../../com/sleepycat/collections/StoredContainer.html" title="class in com.sleepycat.collections">StoredContainer</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../com/sleepycat/collections/StoredContainer.html#areDuplicatesAllowed()">areDuplicatesAllowed</A>, <A HREF="../../../com/sleepycat/collections/StoredContainer.html#areDuplicatesOrdered()">areDuplicatesOrdered</A>, <A HREF="../../../com/sleepycat/collections/StoredContainer.html#areKeysRenumbered()">areKeysRenumbered</A>, <A HREF="../../../com/sleepycat/collections/StoredContainer.html#clear()">clear</A>, <A HREF="../../../com/sleepycat/collections/StoredContainer.html#getCursorConfig()">getCursorConfig</A>, <A HREF="../../../com/sleepycat/collections/StoredContainer.html#isDirtyRead()">isDirtyRead</A>, <A HREF="../../../com/sleepycat/collections/StoredContainer.html#isDirtyReadAllowed()">isDirtyReadAllowed</A>, <A HREF="../../../com/sleepycat/collections/StoredContainer.html#isEmpty()">isEmpty</A>, <A HREF="../../../com/sleepycat/collections/StoredContainer.html#isOrdered()">isOrdered</A>, <A HREF="../../../com/sleepycat/collections/StoredContainer.html#isSecondary()">isSecondary</A>, <A HREF="../../../com/sleepycat/collections/StoredContainer.html#isTransactional()">isTransactional</A>, <A HREF="../../../com/sleepycat/collections/StoredContainer.html#isWriteAllowed()">isWriteAllowed</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.util.Collection"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from interface java.util.Collection</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>add, clear, contains, isEmpty, remove</CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Field Detail</B></FONT></TH> </TR> </TABLE> <A NAME="DEFAULT_ITERATOR_BLOCK_SIZE"><!-- --></A><H3> DEFAULT_ITERATOR_BLOCK_SIZE</H3> <PRE> public static final int <B>DEFAULT_ITERATOR_BLOCK_SIZE</B></PRE> <DL> <DD>The default number of records read at one time by iterators. <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/collections/StoredCollection.html#setIteratorBlockSize(int)"><CODE>setIteratorBlockSize(int)</CODE></A>, <A HREF="../../../constant-values.html#com.sleepycat.collections.StoredCollection.DEFAULT_ITERATOR_BLOCK_SIZE">Constant Field Values</A></DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getIteratorBlockSize()"><!-- --></A><H3> getIteratorBlockSize</H3> <PRE> public int <B>getIteratorBlockSize</B>()</PRE> <DL> <DD>Returns the number of records read at one time by iterators returned by the <A HREF="../../../com/sleepycat/collections/StoredCollection.html#iterator()"><CODE>iterator()</CODE></A> method. By default this value is <A HREF="../../../com/sleepycat/collections/StoredCollection.html#DEFAULT_ITERATOR_BLOCK_SIZE"><CODE>DEFAULT_ITERATOR_BLOCK_SIZE</CODE></A>. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="setIteratorBlockSize(int)"><!-- --></A><H3> setIteratorBlockSize</H3> <PRE> public void <B>setIteratorBlockSize</B>(int blockSize)</PRE> <DL> <DD>Changes the number of records read at one time by iterators returned by the <A HREF="../../../com/sleepycat/collections/StoredCollection.html#iterator()"><CODE>iterator()</CODE></A> method. By default this value is <A HREF="../../../com/sleepycat/collections/StoredCollection.html#DEFAULT_ITERATOR_BLOCK_SIZE"><CODE>DEFAULT_ITERATOR_BLOCK_SIZE</CODE></A>. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the blockSize is less than two.</DL> </DD> </DL> <HR> <A NAME="iterator()"><!-- --></A><H3> iterator</H3> <PRE> public java.util.Iterator <B>iterator</B>()</PRE> <DL> <DD>Returns an iterator over the elements in this collection. The iterator will be read-only if the collection is read-only. This method conforms to the <CODE>Collection.iterator()</CODE> interface. <p>The iterator returned by this method does not keep a database cursor open and therefore it does not need to be closed. It reads blocks of records as needed, opening and closing a cursor to read each block of records. The number of records per block is 10 by default and can be changed with <A HREF="../../../com/sleepycat/collections/StoredCollection.html#setIteratorBlockSize(int)"><CODE>setIteratorBlockSize(int)</CODE></A>.</p> <p>Because this iterator does not keep a cursor open, if it is used without transactions, the iterator does not have <em>cursor stability</em> characteristics. In other words, the record at the current iterator position can be changed or deleted by another thread. To prevent this from happening, call this method within a transaction or use the <A HREF="../../../com/sleepycat/collections/StoredCollection.html#storedIterator()"><CODE>storedIterator()</CODE></A> method instead.</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>iterator</CODE> in interface <CODE>java.lang.Iterable</CODE><DT><B>Specified by:</B><DD><CODE>iterator</CODE> in interface <CODE>java.util.Collection</CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a standard <CODE>Iterator</CODE> for this collection.<DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/collections/StoredContainer.html#isWriteAllowed()"><CODE>StoredContainer.isWriteAllowed()</CODE></A></DL> </DD> </DL> <HR> <A NAME="storedIterator()"><!-- --></A><H3> storedIterator</H3> <PRE> public <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="class in com.sleepycat.collections">StoredIterator</A> <B>storedIterator</B>()</PRE> <DL> <DD>Returns an iterator over the elements in this collection. The iterator will be read-only if the collection is read-only. This method does not exist in the standard <CODE>Collection</CODE> interface. <p>If <code>Iterater.set</code> or <code>Iterator.remove</code> will be called and the underlying Database is transactional, then a transaction must be active when calling this method and must remain active while using the iterator.</p> <p><strong>Warning:</strong> The iterator returned must be explicitly closed using <A HREF="../../../com/sleepycat/collections/StoredIterator.html#close()"><CODE>StoredIterator.close()</CODE></A> or <A HREF="../../../com/sleepycat/collections/StoredIterator.html#close(java.util.Iterator)"><CODE>StoredIterator.close(java.util.Iterator)</CODE></A> to release the underlying database cursor resources.</p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="class in com.sleepycat.collections"><CODE>StoredIterator</CODE></A> for this collection.<DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/collections/StoredContainer.html#isWriteAllowed()"><CODE>StoredContainer.isWriteAllowed()</CODE></A></DL> </DD> </DL> <HR> <A NAME="storedIterator(boolean)"><!-- --></A><H3> storedIterator</H3> <PRE> public <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="class in com.sleepycat.collections">StoredIterator</A> <B>storedIterator</B>(boolean writeAllowed)</PRE> <DL> <DD>Returns a read or read-write iterator over the elements in this collection. This method does not exist in the standard <CODE>Collection</CODE> interface. <p>If <code>Iterater.set</code> or <code>Iterator.remove</code> will be called and the underlying Database is transactional, then a transaction must be active when calling this method and must remain active while using the iterator.</p> <p><strong>Warning:</strong> The iterator returned must be explicitly closed using <A HREF="../../../com/sleepycat/collections/StoredIterator.html#close()"><CODE>StoredIterator.close()</CODE></A> or <A HREF="../../../com/sleepycat/collections/StoredIterator.html#close(java.util.Iterator)"><CODE>StoredIterator.close(java.util.Iterator)</CODE></A> to release the underlying database cursor resources.</p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>writeAllowed</CODE> - is true to open a read-write iterator or false to open a read-only iterator. If the collection is read-only the iterator will always be read-only. <DT><B>Returns:</B><DD>a <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="class in com.sleepycat.collections"><CODE>StoredIterator</CODE></A> for this collection. <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalStateException</CODE> - if writeAllowed is true but the collection is read-only. <DD><CODE>RuntimeExceptionWrapper</CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.<DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/collections/StoredContainer.html#isWriteAllowed()"><CODE>StoredContainer.isWriteAllowed()</CODE></A></DL> </DD> </DL> <HR> <A NAME="iterator(boolean)"><!-- --></A><H3> iterator</H3> <PRE> public <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="class in com.sleepycat.collections">StoredIterator</A> <B>iterator</B>(boolean writeAllowed)</PRE> <DL> <DD><B>Deprecated.</B> <I>Please use <A HREF="../../../com/sleepycat/collections/StoredCollection.html#storedIterator()"><CODE>storedIterator()</CODE></A> or <A HREF="../../../com/sleepycat/collections/StoredCollection.html#storedIterator(boolean)"><CODE>storedIterator(boolean)</CODE></A> instead. Because the iterator returned must be closed, the method name <code>iterator</code> is confusing since standard Java iterators do not need to be closed.</I> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="toArray()"><!-- --></A><H3> toArray</H3> <PRE> public java.lang.Object[] <B>toArray</B>()</PRE> <DL> <DD>Returns an array of all the elements in this collection. This method conforms to the <CODE>Collection.toArray()</CODE> interface. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>toArray</CODE> in interface <CODE>java.util.Collection</CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE>RuntimeExceptionWrapper</CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.</DL> </DD> </DL> <HR> <A NAME="toArray(java.lang.Object[])"><!-- --></A><H3> toArray</H3> <PRE> public java.lang.Object[] <B>toArray</B>(java.lang.Object[] a)</PRE> <DL> <DD>Returns an array of all the elements in this collection whose runtime type is that of the specified array. This method conforms to the <CODE>Collection.toArray(Object[])</CODE> interface. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>toArray</CODE> in interface <CODE>java.util.Collection</CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE>RuntimeExceptionWrapper</CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.</DL> </DD> </DL> <HR> <A NAME="containsAll(java.util.Collection)"><!-- --></A><H3> containsAll</H3> <PRE> public boolean <B>containsAll</B>(java.util.Collection coll)</PRE> <DL> <DD>Returns true if this collection contains all of the elements in the specified collection. This method conforms to the <CODE>Collection.containsAll(java.util.Collection<?>)</CODE> interface. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>containsAll</CODE> in interface <CODE>java.util.Collection</CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE>RuntimeExceptionWrapper</CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.</DL> </DD> </DL> <HR> <A NAME="addAll(java.util.Collection)"><!-- --></A><H3> addAll</H3> <PRE> public boolean <B>addAll</B>(java.util.Collection coll)</PRE> <DL> <DD>Adds all of the elements in the specified collection to this collection (optional operation). This method calls the <CODE>Collection.add(Object)</CODE> method of the concrete collection class, which may or may not be supported. This method conforms to the <CODE>Collection.addAll(java.util.Collection<? extends E>)</CODE> interface. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>addAll</CODE> in interface <CODE>java.util.Collection</CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE>java.lang.UnsupportedOperationException</CODE> - if the collection is read-only, or if the collection is indexed, or if the add method is not supported by the concrete collection. <DD><CODE>RuntimeExceptionWrapper</CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.</DL> </DD> </DL> <HR> <A NAME="removeAll(java.util.Collection)"><!-- --></A><H3> removeAll</H3> <PRE> public boolean <B>removeAll</B>(java.util.Collection coll)</PRE> <DL> <DD>Removes all this collection's elements that are also contained in the specified collection (optional operation). This method conforms to the <CODE>Collection.removeAll(java.util.Collection<?>)</CODE> interface. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>removeAll</CODE> in interface <CODE>java.util.Collection</CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE>java.lang.UnsupportedOperationException</CODE> - if the collection is read-only. <DD><CODE>RuntimeExceptionWrapper</CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.</DL> </DD> </DL> <HR> <A NAME="retainAll(java.util.Collection)"><!-- --></A><H3> retainAll</H3> <PRE> public boolean <B>retainAll</B>(java.util.Collection coll)</PRE> <DL> <DD>Retains only the elements in this collection that are contained in the specified collection (optional operation). This method conforms to the <CODE>Collection.removeAll(java.util.Collection<?>)</CODE> interface. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>retainAll</CODE> in interface <CODE>java.util.Collection</CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE>java.lang.UnsupportedOperationException</CODE> - if the collection is read-only. <DD><CODE>RuntimeExceptionWrapper</CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.</DL> </DD> </DL> <HR> <A NAME="equals(java.lang.Object)"><!-- --></A><H3> equals</H3> <PRE> public boolean <B>equals</B>(java.lang.Object other)</PRE> <DL> <DD>Compares the specified object with this collection for equality. A value comparison is performed by this method and the stored values are compared rather than calling the equals() method of each element. This method conforms to the <CODE>Collection.equals(java.lang.Object)</CODE> interface. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>equals</CODE> in interface <CODE>java.util.Collection</CODE><DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE>RuntimeExceptionWrapper</CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.</DL> </DD> </DL> <HR> <A NAME="hashCode()"><!-- --></A><H3> hashCode</H3> <PRE> public int <B>hashCode</B>()</PRE> <DL> <DD><DL> <DT><B>Specified by:</B><DD><CODE>hashCode</CODE> in interface <CODE>java.util.Collection</CODE><DT><B>Overrides:</B><DD><CODE>hashCode</CODE> in class <CODE>java.lang.Object</CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="toList()"><!-- --></A><H3> toList</H3> <PRE> public java.util.List <B>toList</B>()</PRE> <DL> <DD>Returns a copy of this collection as an ArrayList. This is the same as <A HREF="../../../com/sleepycat/collections/StoredCollection.html#toArray()"><CODE>toArray()</CODE></A> but returns a collection instead of an array. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an <CODE>ArrayList</CODE> containing a copy of all elements in this collection. <DT><B>Throws:</B> <DD><CODE>RuntimeExceptionWrapper</CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.</DL> </DD> </DL> <HR> <A NAME="toString()"><!-- --></A><H3> toString</H3> <PRE> public java.lang.String <B>toString</B>()</PRE> <DL> <DD>Converts the collection to a string representation for debugging. WARNING: The returned string may be very large. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the string representation. <DT><B>Throws:</B> <DD><CODE>RuntimeExceptionWrapper</CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.</DL> </DD> </DL> <HR> <A NAME="size()"><!-- --></A><H3> size</H3> <PRE> public int <B>size</B>()</PRE> <DL> <DD><B>Description copied from class: <CODE><A HREF="../../../com/sleepycat/collections/StoredContainer.html#size()">StoredContainer</A></CODE></B></DD> <DD>Returns a non-transactional count of the records in the collection or map. This method conforms to the <CODE>Collection.size()</CODE> and <CODE>Map.size()</CODE> interfaces. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>size</CODE> in interface <CODE>java.util.Collection</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/sleepycat/collections/StoredContainer.html#size()">size</A></CODE> in class <CODE><A HREF="../../../com/sleepycat/collections/StoredContainer.html" title="class in com.sleepycat.collections">StoredContainer</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="join(com.sleepycat.collections.StoredContainer[], java.lang.Object[], com.sleepycat.db.JoinConfig)"><!-- --></A><H3> join</H3> <PRE> public <A HREF="../../../com/sleepycat/collections/StoredIterator.html" title="class in com.sleepycat.collections">StoredIterator</A> <B>join</B>(<A HREF="../../../com/sleepycat/collections/StoredContainer.html" title="class in com.sleepycat.collections">StoredContainer</A>[] indices, java.lang.Object[] indexKeys, <A HREF="../../../com/sleepycat/db/JoinConfig.html" title="class in com.sleepycat.db">JoinConfig</A> joinConfig)</PRE> <DL> <DD>Returns an iterator representing an equality join of the indices and index key values specified. This method does not exist in the standard <CODE>Collection</CODE> interface. <p><strong>Warning:</strong> The iterator returned must be explicitly closed using <A HREF="../../../com/sleepycat/collections/StoredIterator.html#close()"><CODE>StoredIterator.close()</CODE></A> or <A HREF="../../../com/sleepycat/collections/StoredIterator.html#close(java.util.Iterator)"><CODE>StoredIterator.close(java.util.Iterator)</CODE></A> to release the underlying database cursor resources.</p> <p>The returned iterator supports only the two methods: hasNext() and next(). All other methods will throw UnsupportedOperationException.</p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>indices</CODE> - is an array of indices with elements corresponding to those in the indexKeys array.<DD><CODE>indexKeys</CODE> - is an array of index key values identifying the elements to be selected.<DD><CODE>joinConfig</CODE> - is the join configuration, or null to use the default configuration. <DT><B>Returns:</B><DD>an iterator over the elements in this collection that match all specified index key values. <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalArgumentException</CODE> - if this collection is indexed or if a given index does not have the same store as this collection. <DD><CODE>RuntimeExceptionWrapper</CODE> - if a <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><CODE>DatabaseException</CODE></A> is thrown.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/sleepycat/collections/PrimaryKeyAssigner.html" title="interface in com.sleepycat.collections"><B>PREV CLASS</B></A> <A HREF="../../../com/sleepycat/collections/StoredCollections.html" title="class in com.sleepycat.collections"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/sleepycat/collections/StoredCollection.html" target="_top"><B>FRAMES</B></A> <A HREF="StoredCollection.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>