package flavor.pie.kludge

import java.util.Optional

operator fun <T> Optional<T>?.not(): T? = this.unwrap()

val <T: Any> T?.optional: Optional<T> get() = Optional.ofNullable(this)

fun <T> Optional<T>?.unwrap(): T? = this?.orElse(null)
package flavor.pie.kludge

import java.util.Optional

operator fun <T> Optional<T>?.not(): T? = this.unwrap()

fun <T: Any> T?.optional(): Optional<T> = Optional.ofNullable(this)

fun <T> Optional<T>?.unwrap(): T? = this?.orElse(null)
Convert `optional` into a function
Convert `optional` into a function

pie-flavor/Kludge