📄 recordenumeration.html
字号:
<A NAME="numRecords()"><!-- --></A><H3>
numRecords</H3>
<PRE>
public int <B>numRecords</B>()</PRE>
<DL>
<DD>Returns the number of records available in this enumeration's set. That is, the number of records that have matched the filter criterion. Note that this forces the RecordEnumeration to fully build the enumeration by applying the filter to all records, which may take a non-trivial amount of time if there are a lot of records in the record store.<DD><DL>
<DT><B>Returns:</B><DD>the number of records available in this enumeration's set. That is, the number of records that have matched the filter criterion.</DL>
</DD>
</DL>
<HR>
<A NAME="nextRecord()"><!-- --></A><H3>
nextRecord</H3>
<PRE>
public byte[] <B>nextRecord</B>() throws <A HREF="../../../javax/microedition/rms/InvalidRecordIDException.html">InvalidRecordIDException</A>, <A HREF="../../../javax/microedition/rms/RecordStoreNotOpenException.html">RecordStoreNotOpenException</A>, <A HREF="../../../javax/microedition/rms/RecordStoreException.html">RecordStoreException</A></PRE>
<DL>
<DD>Returns a copy of the <em>next</em> record in this enumeration, where <em>next</em> is defined by the comparator and/or filter supplied in the constructor of this enumerator. The byte array returned is a copy of the record. Any changes made to this array will NOT be reflected in the record store. After calling this method, the enumeration is advanced to the next available record.<DD><DL>
<DT><B>Returns:</B><DD>the next record in this enumeration<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/microedition/rms/InvalidRecordIDException.html">InvalidRecordIDException</A></CODE> - when no more records are available. Subsequent calls to this method will continue to throw this exception until <code>reset()</code> has been called to reset the enumeration.<DD><CODE><A HREF="../../../javax/microedition/rms/RecordStoreNotOpenException.html">RecordStoreNotOpenException</A></CODE> - if the record store is not open<DD><CODE><A HREF="../../../javax/microedition/rms/RecordStoreException.html">RecordStoreException</A></CODE> - if a general record store exception occurs</DL>
</DD>
</DL>
<HR>
<A NAME="nextRecordId()"><!-- --></A><H3>
nextRecordId</H3>
<PRE>
public int <B>nextRecordId</B>() throws <A HREF="../../../javax/microedition/rms/InvalidRecordIDException.html">InvalidRecordIDException</A></PRE>
<DL>
<DD>Returns the recordId of the <em>next</em> record in this enumeration, where <em>next</em> is defined by the comparator and/or filter supplied in the constructor of this enumerator. After calling this method, the enumeration is advanced to the next available record.<DD><DL>
<DT><B>Returns:</B><DD>the recordId of the next record in this enumeration<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/microedition/rms/InvalidRecordIDException.html">InvalidRecordIDException</A></CODE> - when no more records are available. Subsequent calls to this method will continue to throw this exception until <code>reset()</code> has been called to reset the enumeration.</DL>
</DD>
</DL>
<HR>
<A NAME="previousRecord()"><!-- --></A><H3>
previousRecord</H3>
<PRE>
public byte[] <B>previousRecord</B>() throws <A HREF="../../../javax/microedition/rms/InvalidRecordIDException.html">InvalidRecordIDException</A>, <A HREF="../../../javax/microedition/rms/RecordStoreNotOpenException.html">RecordStoreNotOpenException</A>, <A HREF="../../../javax/microedition/rms/RecordStoreException.html">RecordStoreException</A></PRE>
<DL>
<DD>Returns a copy of the <em>previous</em> record in this enumeration, where <em>previous</em> is defined by the comparator and/or filter supplied in the constructor of this enumerator. The byte array returned is a copy of the record. Any changes made to this array will NOT be reflected in the record store. After calling this method, the enumeration is advanced to the next (previous) available record.<DD><DL>
<DT><B>Returns:</B><DD>the previous record in this enumeration<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/microedition/rms/InvalidRecordIDException.html">InvalidRecordIDException</A></CODE> - when no more records are available. Subsequent calls to this method will continue to throw this exception until <code>reset()</code> has been called to reset the enumeration.<DD><CODE><A HREF="../../../javax/microedition/rms/RecordStoreNotOpenException.html">RecordStoreNotOpenException</A></CODE> - if the record store is not open<DD><CODE><A HREF="../../../javax/microedition/rms/RecordStoreException.html">RecordStoreException</A></CODE> - if a general record store exception occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="previousRecordId()"><!-- --></A><H3>
previousRecordId</H3>
<PRE>
public int <B>previousRecordId</B>() throws <A HREF="../../../javax/microedition/rms/InvalidRecordIDException.html">InvalidRecordIDException</A></PRE>
<DL>
<DD>Returns the recordId of the <em>previous</em> record in this enumeration, where <em>previous</em> is defined by the comparator and/or filter supplied in the constructor of this enumerator. After calling this method, the enumeration is advanced to the next (previous) available record.<DD><DL>
<DT><B>Returns:</B><DD>the recordId of the previous record in this enumeration<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/microedition/rms/InvalidRecordIDException.html">InvalidRecordIDException</A></CODE> - when no more records are available. Subsequent calls to this method will continue to throw this exception until <code>reset()</code> has been called to reset the enumeration.</DL>
</DD>
</DL>
<HR>
<A NAME="hasNextElement()"><!-- --></A><H3>
hasNextElement</H3>
<PRE>
public boolean <B>hasNextElement</B>()</PRE>
<DL>
<DD>Returns true if more elements exist in the <em>next</em> direction.<DD><DL>
<DT><B>Returns:</B><DD>true if more elements exist in the <em>next</em> direction</DL>
</DD>
</DL>
<HR>
<A NAME="hasPreviousElement()"><!-- --></A><H3>
hasPreviousElement</H3>
<PRE>
public boolean <B>hasPreviousElement</B>()</PRE>
<DL>
<DD>Returns true if more elements exist in the <em>previous</em> direction.<DD><DL>
<DT><B>Returns:</B><DD>true if more elements exist in the <em>previous</em> direction</DL>
</DD>
</DL>
<HR>
<A NAME="reset()"><!-- --></A><H3>
reset</H3>
<PRE>
public void <B>reset</B>()</PRE>
<DL>
<DD>Returns the enumeration index to the same state as right after the enumeration was created.</DL>
<HR>
<A NAME="rebuild()"><!-- --></A><H3>
rebuild</H3>
<PRE>
public void <B>rebuild</B>()</PRE>
<DL>
<DD>Request that the enumeration be updated to reflect the current record set. Useful for when a MIDlet makes a number of changes to the record store, and then wants an existing RecordEnumeration to enumerate the new changes.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#keepUpdated(boolean)"><CODE>keepUpdated(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="keepUpdated(boolean)"><!-- --></A><H3>
keepUpdated</H3>
<PRE>
public void <B>keepUpdated</B>(boolean keepUpdated)</PRE>
<DL>
<DD>Used to set whether the enumeration will be keep its internal index up to date with the record store record additions/deletions/changes. Note that this should be used carefully due to the potential performance problems associated with maintaining the enumeration with every change.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>keepUpdated</CODE> - if true, the enumerator will keep its enumeration current with any changes in the records of the record store. Use with caution as there are possible performance consequences. Calling <code>keepUpdated(true)</code> has the same effect as calling <code>RecordEnumeration.rebuild</code>: the enumeration will be updated to reflect the current record set. If false the enumeration will not be kept current and may return recordIds for records that have been deleted or miss records that are added later. It may also return records out of order that have been modified after the enumeration was built. Note that any changes to records in the record store are accurately reflected when the record is later retrieved, either directly or through the enumeration. The thing that is risked by setting this parameter false is the filtering and sorting order of the enumeration when records are modified, added, or deleted.<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#rebuild()"><CODE>rebuild()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isKeptUpdated()"><!-- --></A><H3>
isKeptUpdated</H3>
<PRE>
public boolean <B>isKeptUpdated</B>()</PRE>
<DL>
<DD>Returns true if the enumeration keeps its enumeration current with any changes in the records.<DD><DL>
<DT><B>Returns:</B><DD>true if the enumeration keeps its enumeration current with any changes in the records</DL>
</DD>
</DL>
<HR>
<A NAME="destroy()"><!-- --></A><H3>
destroy</H3>
<PRE>
public void <B>destroy</B>()</PRE>
<DL>
<DD>Frees internal resources used by this RecordEnumeration. MIDlets should call this method when they are done using a RecordEnumeration. If a MIDlet tries to use a RecordEnumeration after this method has been called, it will throw a <code>IllegalStateException</code>. Note that this method is used for manually aiding in the minimization of immediate resource requirements when this enumeration is no longer needed.</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<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="class-use/RecordEnumeration.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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>
<strong>MID Profile</strong></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../javax/microedition/rms/RecordComparator.html"><B>PREV CLASS</B></A>
<A HREF="../../../javax/microedition/rms/RecordFilter.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="RecordEnumeration.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<font size="-1"><a href="mailto:midp-feedback@risc.sps.mot.com">Submit a comment or suggestion</a> Version 2.0 of MID Profile Specification<br>Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright (c) 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road,Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -