FreshNameGenerator

class FreshNameGenerator(initialNames: Set<String>)

Generates distinct names. Never generates the same name twice.

Constructors

FreshNameGenerator
Link copied to clipboard
fun FreshNameGenerator()
FreshNameGenerator
Link copied to clipboard
fun FreshNameGenerator(initialNames: Set<String>)

Functions

getFreshName
Link copied to clipboard
fun getFreshName(base: String): String

Returns a new name derived from base. The return name will be different from all previously returned names.