PriorityList
Functions
Link copied to clipboard
fun <Range : SimpleRange<Option>, Option : Any> PriorityList<Range>.preferred(offered: List<Option>): Option?
Selects the client's preferred option from a set of options offered by the server, when the range is a SimpleRange
inline fun <Range, Option : Any, OptionId> PriorityList<Range>.preferred(offered: List<Option>, match: (Range, OptionId) -> Boolean, by: (Option) -> OptionId): Option?
Selects the client's preferred option from a set of options offered by the server, matching a priority list against the id of the options.
Link copied to clipboard
fun <OptionId> PriorityList<SimpleRange<OptionId>>.toSimpleRangeHeader(optionForHeader: (OptionId) -> String): String