<!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.4.2_03) on Mon Oct 10 16:31:48 CEST 2005 -->
<TITLE>
RecordEnumeration (IM Profile)
</TITLE>

<META NAME="keywords" CONTENT="javax.microedition.rms.RecordEnumeration interface">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="RecordEnumeration (IM Profile)";
}
</SCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= 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=3 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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/RecordEnumeration.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<strong>IM Profile</strong></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/microedition/rms/RecordComparator.html" title="interface in javax.microedition.rms"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/rms/RecordFilter.html" title="interface in javax.microedition.rms"><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>  &nbsp;
&nbsp;<A HREF="RecordEnumeration.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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">
javax.microedition.rms</FONT>
<BR>
Interface RecordEnumeration</H2>
<HR>
<DL>
<DT>public interface <B>RecordEnumeration</B></DL>

<P>
An interface representing a bidirectional record store Record
 enumerator. The RecordEnumeration logically maintains a sequence of
 the recordId's of the records in a record store. The enumerator
 will iterate over all (or a subset, if an optional record filter
 has been supplied) of the records in an order determined by an
 optional record comparator.

 <p>By using an optional <code>RecordFilter</code>, a subset of the
 records can be chosen that match the supplied filter. This can be
 used for providing search capabilities.</p>

 <p>By using an optional <code>RecordComparator</code>, the
 enumerator can index through the records in an order determined by
 the comparator. This can be used for providing sorting
 capabilities.</p>

 <p>If, while indexing through the enumeration, some records are
 deleted from the record store, the recordId's returned by the
 enumeration may no longer represent valid records. To avoid this
 problem, the RecordEnumeration can optionally become a listener of
 the RecordStore and react to record additions and deletions by
 recreating its internal index. Use special care when using this
 option however, in that every record addition, change and deletion
 will cause the index to be rebuilt, which may have serious
 performance impacts.</p>

 <p>If the RecordStore used by this RecordEnumeration is closed,
 this RecordEnumeration becomes invalid and all subsequent
 operations performed on it may give invalid results or throw a
 RecordStoreNotOpenException, even if the same RecordStore is later
 opened again. In addition, calls to <code>hasNextElement()</code>
 and <code>hasPreviousElement()</code> will return false.</p>

 <p>The first call to <code>nextRecord()</code> returns the record
 data from the first record in the sequence. Subsequent calls to
 <code>nextRecord()</code> return the next consecutive record's
 data. To return the record data from the previous consecutive from
 any given point in the enumeration, call
 <code>previousRecord()</code>. On the other hand, if after
 creation, the first call is to <code>previousRecord()</code>, the
 record data of the last element of the enumeration will be
 returned. Each subsequent call to <code>previousRecord()</code>
 will step backwards through the sequence until the beginning is
 reached.</p>

 <p>Final note, to do record store searches, create a
 RecordEnumeration with no RecordComparator, and an appropriate
 RecordFilter with the desired search criterion.</p>
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>MIDP 1.0</DD>
</DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->


<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#destroy()">destroy</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frees internal resources used by this RecordEnumeration.
 </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#hasNextElement()">hasNextElement</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if more elements exist in the <em>next</em> direction.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#hasPreviousElement()">hasPreviousElement</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if more elements exist in the <em>previous</em> direction.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#isKeptUpdated()">isKeptUpdated</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the enumeration keeps its enumeration
 current with any changes in the records.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#keepUpdated(boolean)">keepUpdated</A></B>(boolean&nbsp;keepUpdated)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Used to set whether the enumeration will be keep its internal
 index up to date with the record store record
 additions/deletions/changes. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#nextRecord()">nextRecord</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#nextRecordId()">nextRecordId</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#numRecords()">numRecords</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of records available in this enumeration's
 set. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#previousRecord()">previousRecord</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#previousRecordId()">previousRecordId</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#rebuild()">rebuild</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Request that the enumeration be updated to reflect the current
 record set. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/rms/RecordEnumeration.html#reset()">reset</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the enumeration index to the same state as right
 after the enumeration was created.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->


<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<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.
<P>
<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" title="class in javax.microedition.rms">InvalidRecordIDException</A>,
                         <A HREF="../../../javax/microedition/rms/RecordStoreNotOpenException.html" title="class in javax.microedition.rms">RecordStoreNotOpenException</A>,
                         <A HREF="../../../javax/microedition/rms/RecordStoreException.html" title="class in javax.microedition.rms">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.
<P>
<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" title="class in javax.microedition.rms">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" title="class in javax.microedition.rms">RecordStoreNotOpenException</A></CODE> - if the record store is
          not open
<DD><CODE><A HREF="../../../javax/microedition/rms/RecordStoreException.html" title="class in javax.microedition.rms">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" title="class in javax.microedition.rms">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.
<P>
<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" title="class in javax.microedition.rms">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" title="class in javax.microedition.rms">InvalidRecordIDException</A>,
                             <A HREF="../../../javax/microedition/rms/RecordStoreNotOpenException.html" title="class in javax.microedition.rms">RecordStoreNotOpenException</A>,
                             <A HREF="../../../javax/microedition/rms/RecordStoreException.html" title="class in javax.microedition.rms">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.
<P>
<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" title="class in javax.microedition.rms">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" title="class in javax.microedition.rms">RecordStoreNotOpenException</A></CODE> - if the record store is
          not open
<DD><CODE><A HREF="../../../javax/microedition/rms/RecordStoreException.html" title="class in javax.microedition.rms">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" title="class in javax.microedition.rms">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.
<P>
<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" title="class in javax.microedition.rms">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.
<P>
<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.
<P>
<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.
<P>
<DD><DL>
</DL>
</DD>
</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.
<P>
<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&nbsp;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.
<P>
<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.
<P>
<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.
<P>
<DD><DL>
</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=3 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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/RecordEnumeration.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<strong>IM Profile</strong></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/microedition/rms/RecordComparator.html" title="interface in javax.microedition.rms"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/rms/RecordFilter.html" title="interface in javax.microedition.rms"><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>  &nbsp;
&nbsp;<A HREF="RecordEnumeration.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
<font size=\-1\><a href=\mailto:midp-feedback@risc.sps.mot.com\>Submit a comment or suggestion</a> Version 2.0 of IM 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>
