StrengthOrder

class StrengthOrder(newStrength: Int) : Order<ViewData> (source)

An Order implementation that compares ViewData objects based on their labels, using a specified strength level for the Collator.

This class is typically used to sort lists of applications or other items that have display labels, allowing for locale-sensitive and strength-aware sorting.

Parameters

newStrength

The strength level to be used by the Collator for comparison. This determines the sensitivity of the comparison (e.g., ignoring case, accents). Valid values are constants defined in Collator, such as Collator.PRIMARY, Collator.SECONDARY, Collator.TERTIARY, or Collator.IDENTICAL.

Constructors

Link copied to clipboard
constructor(newStrength: Int)

Functions

Link copied to clipboard
open override fun compare(first: ViewData, second: ViewData): Int