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

Using a RecordFilter Object

A filter is an algorithm that you can submit to the RecordStore::enumerateRecords() method to direct it to select only specific records from the RecordStore object. To create a filter, you implement a specialized version of the RecordFilter class. To specialize the class, you override the matches() method. After you have implemented a specialized version of the RecordFilter class, you can then use an instance of it as the first argument in the enumerateRecords() method. Table 8.5 provides a summary view of some of the details related to the class.

Table 8.5. RecordFilter Details
MethodDescription
boolean matches (byte[] candidate)Returns true if the candidate record validly passes through the filtering rules. You must ...

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