O'Reilly logo

Java™ ME Game Programming, Second Edition by Ph.D. Martin J. Wells, Ph.D. John P. Flynt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Record Enumerations and Record Stores

Using the RecordEnumeration object, it is possible to iterate forward or backward through the records in a RecordStore object. After you have created a RecordStore object and populated it with records, the basic procedure for associating a RecordEnumeration object with it involves, first, declaring a RecordEnumeration object and then calling the RecordStore::enumerateRecords() method to enumerate objects in the RecordStore object and initialize the RecordEnumeration object.

Figure 8.9 illustrates a basic approach to accomplishing this task. After you have created the RecordEnumeration object, you employ it to call such methods as hasNextElement() and nextRecord() to navigate through the DataStore records. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required