I’ve come across the following statement on PeopleBooks (PeopleCode API Reference > Application Classes > When Would You Use Application Classes?). This statement can be found in PeopleBooks for PeopleTools versions 8.45 to 8.49:

… suppose you want to provide a more generic sort, with comparison function at the end of it. You want to use the array class Sort method, but your process has to be generic: you aren’t certain if you’re comparing two records or two strings. You could define a class that had as its main method a comparison, and return a -1, 0, or 1. Then write your personalized sort, extending the array class method Sort.

I find this statement very vague and lacking in details, that I am doubtful about its accuracy.

The statement seems to somewhat describe how one would define the ordering of objects in Java’s array and collection classes by creating an implementation of java.util.Comparator interface. However, according to PeopleBooks, the Sort method of the Array class does not have any optional parameters where such a comparator object may be provided.

I couldn’t find anything else in PeopleBooks where it describes the implementation of array sorting in the manner described in the statement above. Can anyone shed some light into this, and if possible, provide additional details? Does the PeopleCode Array class Sort method have an undocumented feature similar Java Arrays’ sort method?