All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.inforion.lab403.common.extensions.enums.kt Maven / Gradle / Ivy

There is a newer version: 0.3.5
Show newest version
package ru.inforion.lab403.common.extensions

/**
 * Created by Alexei Gladkikh on 02/03/17.
 */

inline fun > find(predicate: (item: T) -> Boolean): T? = enumValues().find { predicate(it) }
inline fun > first(predicate: (item: T) -> Boolean): T = enumValues().first { predicate(it) }

inline fun > convert(ord: Int): T = enumValues()[ord]




© 2015 - 2024 Weber Informatics LLC | Privacy Policy