Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
typealias ByteArrayAllocator = () -> ByteArray
Link copied to clipboard
Link copied to clipboard
@Serializable
data class Diff<T>

Diff object which contains information about differences between two Iterables

Link copied to clipboard
@Serializable(with = EitherSerializer::class)
interface Either<T1, T2>

Realization of this interface will contains at least one not null - optionalT1 or optionalT2

Link copied to clipboard
@Serializable
data class EitherFirst<T1, T2>(val t1: T1) : Either<T1, T2>

This type Either will always have not nullable optionalT1

Link copied to clipboard
@Serializable
data class EitherSecond<T1, T2>(val t2: T2) : Either<T1, T2>

This type Either will always have not nullable optionalT2

Link copied to clipboard
class EitherSerializer<T1, T2>(t1Serializer: KSerializer<T1>, t2Serializer: KSerializer<T2>) : KSerializer<Either<T1, T2>>
Link copied to clipboard
@Serializable
value class FileName(val string: String)
Link copied to clipboard
class IndexedValueSerializer<T>(subSerializer: KSerializer<T>) : KSerializer<IndexedValue<T>>
Link copied to clipboard
expect class MPPFile
Link copied to clipboard
@Serializable
data class Optional<T>

This type represents T as not only potentially nullable data, but also as a data which can not be presented. This type will be useful in cases when T is nullable and null as valuable data too in time of data absence should be presented by some third type.

Link copied to clipboard
annotation class PreviewFeature(val message: String = "It is possible, that behaviour of this thing will be changed or removed in future releases")
Link copied to clipboard
@Serializable
value class Progress
Link copied to clipboard
interface SimpleMapper<T1, T2>
Link copied to clipboard
class SimpleMapperImpl<T1, T2>(t1: (T2) -> T1, t2: (T1) -> T2) : SimpleMapper<T1, T2>
Link copied to clipboard
Link copied to clipboard
class SimpleSuspendableMapperImpl<T1, T2>(t1: suspend (T2) -> T1, t2: suspend (T1) -> T2) : SimpleSuspendableMapper<T1, T2>
Link copied to clipboard
typealias SuspendByteArrayAllocator = suspend () -> ByteArray

Functions

Link copied to clipboard
inline fun Boolean.alsoIfFalse(block: () -> Unit): Boolean
Link copied to clipboard
inline fun Boolean.alsoIfTrue(block: () -> Unit): Boolean
Link copied to clipboard
fun <T> MutableList<T>.applyDiff(source: Iterable<T>, strictComparison: Boolean = false): Diff<T>

This method call calculateDiff with strict mode strictComparison and then apply differences to this mutable list

fun <T> MutableList<T>.applyDiff(source: Iterable<T>, comparisonFun: (T?, T?) -> Boolean): Diff<T>

This method call calculateDiff with strict mode strictComparison and then apply differences to this mutable list

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun MPPFile.bytes(): ByteArray
Link copied to clipboard
Link copied to clipboard
fun <T> Iterable<T>.calculateDiff(other: Iterable<T>, strictComparison: Boolean = false): Diff<T>
fun <T> Iterable<T>.calculateDiff(other: Iterable<T>, comparisonFun: (T?, T?) -> Boolean): Diff<T>

Calculating Diff object

Link copied to clipboard
inline fun <T> Iterable<T>.calculateStrictDiff(other: Iterable<T>): Diff<T>

This method call calculateDiff with strict mode enabled

Link copied to clipboard
fun View.changeVisibility(show: Boolean = !isShown, goneOnHide: Boolean = true)
Link copied to clipboard
fun View.collapse(duration: Long = 500)
Link copied to clipboard
fun View.collapseHorizontally(duration: Long = 500)
Link copied to clipboard
operator fun Progress.compareTo(other: Progress): Int
Link copied to clipboard
@JvmName(name = "convertFromT2")
fun <T1, T2> SimpleMapper<T1, T2>.convert(from: T2): T1
@JvmName(name = "convertFromT1")
fun <T1, T2> SimpleMapper<T1, T2>.convert(from: T1): T2
@JvmName(name = "convertFromT2")
suspend fun <T1, T2> SimpleSuspendableMapper<T1, T2>.convert(from: T2): T1
@JvmName(name = "convertFromT1")
suspend fun <T1, T2> SimpleSuspendableMapper<T1, T2>.convert(from: T1): T2
Link copied to clipboard
inline fun <T> Optional<T>.dataOrElse(block: () -> T): T

Returns Optional.data if Optional.dataPresented of this is true, or call block and returns the result of it

Link copied to clipboard
fun <T> Optional<T>.dataOrNull(): T?

Returns Optional.data if Optional.dataPresented of this is true, or null otherwise

Link copied to clipboard
fun <T> Optional<T>.dataOrThrow(throwable: Throwable): T

Returns Optional.data if Optional.dataPresented of this is true, or throw throwable otherwise

Link copied to clipboard
inline fun <T> Diff(old: Iterable<T>, new: Iterable<T>): Diff<T>
Link copied to clipboard
inline fun <T> Iterable<T>.diff(other: Iterable<T>, strictComparison: Boolean = false): Diff<T>
inline fun <T> Iterable<T>.diff(other: Iterable<T>, noinline comparisonFun: (T?, T?) -> Boolean): Diff<T>
Link copied to clipboard
Link copied to clipboard
operator fun Progress.div(i: Byte): Progress
operator fun Progress.div(i: Double): Progress
operator fun Progress.div(i: Float): Progress
operator fun Progress.div(i: Int): Progress
operator fun Progress.div(i: Long): Progress
operator fun Progress.div(i: Short): Progress
Link copied to clipboard
fun InputStream.downloadToTempFile(fileName: String = UUID.randomUUID().toString(), fileExtension: String? = ".temp", folder: File? = null): File
Link copied to clipboard
inline fun <T1, T2> Any.either(): <Error class: unknown class>
Link copied to clipboard
fun <T> emptyDiff(): Diff<T>
Link copied to clipboard
fun View.enable()
Link copied to clipboard
fun View.expand(duration: Long = 500, targetWidth: Int = ViewGroup.LayoutParams.MATCH_PARENT, targetHeight: Int = ViewGroup.LayoutParams.WRAP_CONTENT)
Link copied to clipboard
fun View.expandHorizontally(duration: Long = 500, targetWidth: Int = ViewGroup.LayoutParams.MATCH_PARENT, targetHeight: Int = ViewGroup.LayoutParams.WRAP_CONTENT)
Link copied to clipboard
fun findViewsByTag(view: View, tag: Any?): List<View>
fun findViewsByTag(viewGroup: ViewGroup, tag: Any?): List<View>
fun findViewsByTag(view: View, key: Int, tag: Any?): List<View>
fun findViewsByTag(viewGroup: ViewGroup, key: Int, tag: Any?): List<View>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T1, T2> <Error class: unknown class>.first(t1: T1): Either<T1, T2>
Link copied to clipboard
fun <T> Iterable<T?>.firstNotNull(): <Error class: unknown class>
Link copied to clipboard
expect fun Double.fixed(signs: Int): Double
expect fun Float.fixed(signs: Int): Float
actual fun Double.fixed(signs: Int): Double
actual fun Float.fixed(signs: Int): Float
Link copied to clipboard
inline fun Resources.getDp(resId: Int): Float
Link copied to clipboard
inline fun Resources.getSp(resId: Int): Float
Link copied to clipboard
inline fun View.gone()
Link copied to clipboard
inline fun View.hide()
Link copied to clipboard
inline fun <T> Boolean.ifFalse(block: () -> T): T?
Link copied to clipboard
inline fun <T> Boolean.ifTrue(block: () -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <I> Iterable<I>.joinTo(separator: I? = null, prefix: I? = null, postfix: I? = null): List<I>
inline fun <I> Iterable<I>.joinTo(separatorFun: (I) -> I?, prefix: I? = null, postfix: I? = null): List<I>
inline fun <I, R> Array<I>.joinTo(separator: R? = null, prefix: R? = null, postfix: R? = null, transform: (I) -> R?): Array<R>
inline fun <I, R> Array<I>.joinTo(separatorFun: (I) -> R?, prefix: R? = null, postfix: R? = null, transform: (I) -> R?): Array<R>
inline fun <I, R> Iterable<I>.joinTo(separator: R? = null, prefix: R? = null, postfix: R? = null, transform: (I) -> R?): List<R>
inline fun <I, R> Iterable<I>.joinTo(separatorFun: (I) -> R?, prefix: R? = null, postfix: R? = null, transform: (I) -> R?): List<R>
Link copied to clipboard
inline fun <T> Boolean.letIfFalse(block: () -> T): T?
Link copied to clipboard
inline fun <T> Boolean.letIfTrue(block: () -> T): T?
Link copied to clipboard
inline fun <T, R> Array<T>.mapNotNullA(mapper: (T) -> R?): List<R>
inline fun <T, R> Iterable<T>.mapNotNullA(transform: (T) -> R?): List<R>
Link copied to clipboard
inline fun <T, R> Optional<T>.mapOnAbsent(block: () -> R): R?

Will call block when data presented (Optional.dataPresented == true)

Link copied to clipboard
inline fun <T1, R> Either<T1, *>.mapOnFirst(block: (T1) -> R): R?
Link copied to clipboard
inline fun <T, R> Optional<T>.mapOnPresented(block: (T) -> R): R?

Will call block when data presented (Optional.dataPresented == true)

Link copied to clipboard
inline fun <T2, R> Either<*, T2>.mapOnSecond(block: (T2) -> R): R?
Link copied to clipboard
operator fun Progress.minus(other: Progress): Progress
operator fun Progress.minus(i: Byte): Progress
operator fun Progress.minus(i: Double): Progress
operator fun Progress.minus(i: Float): Progress
operator fun Progress.minus(i: Int): Progress
operator fun Progress.minus(i: Long): Progress
operator fun Progress.minus(i: Short): Progress
Link copied to clipboard
inline fun <T> Optional<T>.onAbsent(block: () -> Unit): Optional<T>

Will call block when data absent (Optional.dataPresented == false)

Link copied to clipboard
inline fun <T1, T2, E : Either<T1, T2>> E.onFirst(block: (T1) -> Unit): E

Will call block in case when this is EitherFirst

Link copied to clipboard
inline fun <T> Optional<T>.onPresented(block: (T) -> Unit): Optional<T>

Will call block when data presented (Optional.dataPresented == true)

Link copied to clipboard
inline fun <T1, T2, E : Either<T1, T2>> E.onSecond(block: (T2) -> Unit): E

Will call block in case when this is EitherSecond

Link copied to clipboard
operator fun Progress.plus(other: Progress): Progress
operator fun Progress.plus(i: Byte): Progress
operator fun Progress.plus(i: Double): Progress
operator fun Progress.plus(i: Float): Progress
operator fun Progress.plus(i: Int): Progress
operator fun Progress.plus(i: Long): Progress
operator fun Progress.plus(i: Short): Progress
Link copied to clipboard
operator fun Progress.rem(i: Byte): Progress
operator fun Progress.rem(i: Double): Progress
operator fun Progress.rem(i: Float): Progress
operator fun Progress.rem(i: Int): Progress
operator fun Progress.rem(i: Long): Progress
operator fun Progress.rem(i: Short): Progress
Link copied to clipboard
inline fun <R> repeatOnFailure(onFailure: (Throwable) -> Boolean, action: () -> R): Result<R>

Executes the given action until getting of successful result specified number of times.

inline fun <R> repeatOnFailure(times: Int, onEachFailure: (Throwable) -> Unit = {}, action: (Int) -> R): Optional<R>

Executes the given action until getting of successful result specified number of times.

Link copied to clipboard
inline fun <T1, T2> <Error class: unknown class>.second(t2: T2): Either<T1, T2>
Link copied to clipboard
inline fun View.show()
Link copied to clipboard
inline fun <T1, T2> simpleMapper(noinline t1: (T2) -> T1, noinline t2: (T1) -> T2): SimpleMapperImpl<T1, T2>
Link copied to clipboard
inline fun <T1, T2> simpleSuspendableMapper(noinline t1: suspend (T2) -> T1, noinline t2: suspend (T1) -> T2): SimpleSuspendableMapperImpl<T1, T2>
Link copied to clipboard
inline fun <T> StrictDiff(old: Iterable<T>, new: Iterable<T>): Diff<T>
Link copied to clipboard
operator fun Progress.times(i: Byte): Progress
operator fun Progress.times(i: Double): Progress
operator fun Progress.times(i: Float): Progress
operator fun Progress.times(i: Int): Progress
operator fun Progress.times(i: Long): Progress
operator fun Progress.times(i: Short): Progress
Link copied to clipboard

Convert this to Byte with bounds of Byte.MIN_VALUE and Byte.MAX_VALUE

Convert this to Byte with bounds of Byte.MIN_VALUE and Byte.MAX_VALUE

Convert this to Byte with bounds of Byte.MIN_VALUE and Byte.MAX_VALUE

Link copied to clipboard

Convert this to Int with bounds of Int.MIN_VALUE and Int.MAX_VALUE

Link copied to clipboard

Convert this to Short with bounds of Short.MIN_VALUE and Short.MAX_VALUE

Convert this to Short with bounds of Short.MIN_VALUE and Short.MAX_VALUE

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun View.toggleExpandState(duration: Long = 500): Boolean
Link copied to clipboard
fun View.toggleVisibility(goneOnHide: Boolean = true)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
expect val MPPFile.filesize: Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard