mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2026-10-28 23:52:57 +00:00
add full cache repos
This commit is contained in:
1 parent
540d5cce7c
commit
0d0c16e16d
10 files changed
+378
-55
No files matched your search
@@ -41,6 +41,13 @@ data class Optional<T> internal constructor(
|
||||
inline val <T> T.optional
|
||||
get() = Optional.presented(this)
|
||||
|
||||
inline val <T : Any> T?.optionalOrAbsentIfNull
|
||||
get() = if (this == null) {
|
||||
Optional.absent<T>()
|
||||
} else {
|
||||
Optional.presented(this)
|
||||
}
|
||||
|
||||
/**
|
||||
* Will call [block] when data presented ([Optional.dataPresented] == true)
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user