Name
RecordEnumeration
Synopsis
RecordEnumeration
is an interface that provides
method to enumerate, or iterate, through a set of records in a
RecordStore
. The RecordEnumeration
may be constructed so that only a subset of the records appear. In
addition, it may also specify the order in which the records are presented.
Once the enumeration has been constructed, records may be traversed
either forwards or backwards, and the traversal direction may be changed at
any time.
A RecordEnumeration
is obtained by calling the
RecordStore
enumerateRecords()
method,
which accepts three parameters that determine the content and ordering of
the enumeration:
- filter
A
RecordFilter
that selects which records will appear in the enumeration. If this argument isnull
, the enumeration will include all of the records.- comparator
A
RecordComparator
that determines the order in which the records appear in the enumeration. If this parameter isnull
, the record order is undefined.- keepUpdated
If this parameter has the value
false
, the set of records that appears in the enumeration, as well as their order, is determined once and is thereafter fixed, even if the underlyingRecordStore
content changes. If this parameter istrue
, changes in theRecordStore
will be immediately visible in the enumeration. Note that setting this parameter totrue
can be very expensive as each change to theRecordStore
requires a potentially time-consuming operation to rebuild the enumeration.
Once an enumeration has been created, ...
Get J2ME in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.