×
Namespaces

Variants
Actions

Talk:Record sorting in RMS

From Nokia Developer Wiki
Jump to: navigation, search
{{{width}}}
28 Sep
2009
Article Review by Larry101 (20090928)

For those familiar with how sorting works in Java SE, this will be a very familiar concept. The code example is kept nice and simple. It shows both how to instantiate a sorted RecordEnumeration and how to implement the RecordComparator interface (through the compare method). The entire process is also shown in a complete code example, showing the process from start to finish.

One relatively minor criticism I have of this article is that it does not show how the compare method should be implemented differently if the programmer desires the records to be sorted in descending order as opposed to ascending order. This is a simple matter of swapping the PRECEDES and FOLLOWS return values.


 
×