KVar

class KVar<T>(initialValue: T) : KVal<T>

Functions

addListener
Link copied to clipboard
fun addListener(listener: (T, T) -> Unit): Long
close
Link copied to clipboard
fun close(reason: CloseReason)
map
Link copied to clipboard
fun <O> map(mapper: (T) -> O): KVal<O>
fun <O> map(reversibleFunction: ReversibleFunction<T, O>): KVar<O>
onClose
Link copied to clipboard
fun onClose(handler: () -> Unit)
removeListener
Link copied to clipboard
fun removeListener(handle: Long)
toString
Link copied to clipboard
open override fun toString(): String

Properties

value
Link copied to clipboard
open override var value: T

Extensions

get
Link copied to clipboard
operator fun <T : Any> KVar<List<T>>.get(pos: Int): KVar<T>
KVar extensions
operator fun <K : Any, V : Any> KVar<Map<K, V>>.get(k: K): KVar<V?>
modify
Link copied to clipboard
fun <T : Any> KVar<T>.modify(f: (T) -> T)
notNull
Link copied to clipboard
fun <O : Any> KVar<O?>.notNull(default: O? = null, invertDefault: Boolean = true): KVar<O>
path
Link copied to clipboard
val KVar<URL>.path: KVar<String>
pathQueryFragment
Link copied to clipboard
val KVar<URL>.pathQueryFragment: KVar<String>
Given the URI specification:URI = scheme:[//authority]path[?query][#fragment]The pqf refers to the path[?query][#fragment] and can be used to change the path, query, and/or fragment of the URL in one shot.
pathSegments
Link copied to clipboard
val KVar<URL>.pathSegments: KVar<List<String>>
plus
Link copied to clipboard
infix operator fun KVar<String>.plus(s: String): KVal<String>
property
Link copied to clipboard
inline fun <O, T> KVar<T>.property(property: KProperty1<T, O>): KVar<O>
query
Link copied to clipboard
val KVar<URL>.query: KVar<String?>
subList
Link copied to clipboard
fun <T : Any> KVar<List<T>>.subList(fromIx: Int, toIx: Int): KVar<List<T>>
toInt
Link copied to clipboard
fun KVar<String>.toInt(): KVar<Int>