selectName

abstract fun selectName(names: List<String>): Int

An optimized way to retrieve the nextName when the candidates and their order is known. selectName maintains the current index in the list and saves having to string compare nextName to every candidate.

Return

the index of the next name or -1 if there is no next name