Companion

Companion object for Order interface providing factory methods and constants for creating Order instances.

Functions

Link copied to clipboard
context(order: Order<Element>)
fun <Target, Element> Order.Companion.byOrdered(vararg selectors: (Target) -> Element): Order<Target>

Creates an Order instance that compares elements of type Target by comparing the results of applying the provided selectors to each element.

Link copied to clipboard

Returns Order instance which Order.compareTo operator just uses Comparable.compareTo operator's result as a return value.

Link copied to clipboard
context(registry: MutableOwnedProviderRegistry<KoneContextRegistry>)
fun <Element : Comparable<Element>> Order.Companion.setDefaultFor()

Sets default Order context for the given supplied type Element (which must implement Comparable) into context registry builder.