Package-level declarations

Functions

Link copied to clipboard
infix fun <T> T.and(other: T): PersistentList<T>

Adds two elements to a new PersistentList.

Link copied to clipboard
inline fun <T : Throwable> booleanCatch(errorCallback: (T) -> Boolean = { true }, run: () -> Any?): Boolean

Run a try catch and if there is an exception return false

Link copied to clipboard
inline fun <T : Throwable, A> Either.Companion.catch(block: () -> A): Either<T, A>
inline fun <T : Throwable, U : Any> catch(default: U, run: () -> U): U
inline fun <T : Throwable, U : Any> catch(err: (T) -> U, run: () -> U): U
inline fun <T : Throwable> catch(err: (T) -> Unit = { it.printStackTrace() }, run: () -> Unit)
Link copied to clipboard
inline fun <T : Throwable, R> catchAndReturn(err: (T) -> Unit = { it.printStackTrace() }, run: () -> R): R?
Link copied to clipboard
infix fun KClass<*>.doesOverride(functionName: String): Boolean
infix fun KClass<*>.doesOverride(function: KFunction<*>): Boolean
infix fun KClass<*>.doesOverride(property: KProperty1<*, *>): Boolean
Link copied to clipboard
inline fun <E : Enum<*>> Enum.Companion.fromOrdinal(ordinal: Int, orElse: (Int) -> E = { throw LevelConversionException { "Couldn't convert $ordinal to an enum of ${E::class.simpleName}" } }): E

Get an enum instance from the ordinal value.

Link copied to clipboard
inline fun Boolean?.ifFalse(action: () -> Unit): Boolean

Calls the supplied action if the receiver is false.

Link copied to clipboard
inline fun <T> Collection<T>?.ifNotEmpty(block: Collection<T>.() -> Unit): Collection<T>?

Invokes the given block if the receiver is not empty.

Link copied to clipboard
inline fun <T> T?.ifNotNull(action: T.() -> Unit): Boolean

Calls the supplied action if the receiver is not null.

Link copied to clipboard
inline fun <T : Any> T?.ifNull(action: () -> Unit): Boolean

Calls the supplied action if the receiver is null.

Link copied to clipboard
inline fun Boolean?.ifTrue(action: () -> Unit): Boolean

Calls the supplied action if the receiver is true.

Link copied to clipboard
inline fun <T : Any> T.invokeIfOverrides(methodName: String, block: (T) -> Unit): Boolean

Invokes the given block if the receiver overrides the supplied method.

Link copied to clipboard
infix fun <F, S, T> Pair<F, S>.to(other: T): Triple<F, S, T>
Link copied to clipboard
fun () -> Any??.toSafeString(): String

Converts an invokable to a string safely.

Properties

Link copied to clipboard

Gets the parent kClass of a companionObject else null.