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

e.ultra.mutator.0.76.0.source-code.common.kt Maven / Gradle / Ivy

The newest version!
package de.peekandpoke.ultra.mutator

typealias OnModify = (newValue: T) -> Unit

infix fun  X.isSameAs(other: X) = !isNotSameAs(other)

@Suppress("USELESS_CAST")
infix fun  X.isNotSameAs(other: X) = when {

    this == null -> other != null

    other == null -> true

    else -> {

        val cls = (this as Any)::class

        when {

            cls == String::class -> this != other

            cls.javaPrimitiveType != null -> this != other

            else -> this !== other
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy