Converter

interface Converter<F, T>

Converts values from one type to another bi-directionally. The type parameters F and T can be read as FROM and TO, as the forwards conversion converts F to T.

Most commonly used to convert a value to a String (e.g. SpinnerBase.converter). In which case T is String.

It can also be used to convert values to/from the same type. e.g. You could have a UnaryMinus converter, which reverses the sign of a number.

Inheritors

Functions

Link copied to clipboard
abstract fun backwards(value: T): F
Link copied to clipboard
abstract fun forwards(value: F): T