convert

open override fun convert(dataList: List<AppData>, comparator: Comparator<ViewData>?): List<ViewData>(source)

Converts a list of AppData objects into a list of ViewData objects.

This is an abstract function that must be implemented by concrete strategy classes. The implementation should define how the conversion is performed and, if a comparator is provided, how the resulting ViewData list is sorted.

Return

A mutable list of ViewData objects, potentially sorted according to the provided comparator. The list can contain null elements.

Parameters

dataList

The mutable list of AppData objects to be converted. The list can contain null elements.

comparator

An optional Comparator to sort the resulting list of ViewData objects. If null, the list will not be sorted by this function.