mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-11 02:43:49 +00:00
248 lines
30 KiB
HTML
248 lines
30 KiB
HTML
<!DOCTYPE html>
|
|
<html class="no-js">
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
|
|
<title>Optional</title>
|
|
<link href="../../../images/logo-icon.svg" rel="icon" type="image/svg">
|
|
<script>var pathToRoot = "../../../";</script>
|
|
<script>document.documentElement.classList.replace("no-js","js");</script>
|
|
<script>const storage = localStorage.getItem("dokka-dark-mode")
|
|
if (storage == null) {
|
|
const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
if (osDarkSchemePreferred === true) {
|
|
document.getElementsByTagName("html")[0].classList.add("theme-dark")
|
|
}
|
|
} else {
|
|
const savedDarkMode = JSON.parse(storage)
|
|
if(savedDarkMode === true) {
|
|
document.getElementsByTagName("html")[0].classList.add("theme-dark")
|
|
}
|
|
}
|
|
</script>
|
|
<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async="async"></script>
|
|
<script type="text/javascript" src="../../../scripts/sourceset_dependencies.js" async="async"></script>
|
|
<link href="../../../styles/style.css" rel="Stylesheet">
|
|
<link href="../../../styles/main.css" rel="Stylesheet">
|
|
<link href="../../../styles/prism.css" rel="Stylesheet">
|
|
<link href="../../../styles/logo-styles.css" rel="Stylesheet">
|
|
<link href="../../../styles/font-jb-sans-auto.css" rel="Stylesheet">
|
|
<script type="text/javascript" src="../../../scripts/clipboard.js" async="async"></script>
|
|
<script type="text/javascript" src="../../../scripts/navigation-loader.js" async="async"></script>
|
|
<script type="text/javascript" src="../../../scripts/platform-content-handler.js" async="async"></script>
|
|
<script type="text/javascript" src="../../../scripts/main.js" defer="defer"></script>
|
|
<script type="text/javascript" src="../../../scripts/prism.js" async="async"></script>
|
|
<script type="text/javascript" src="../../../scripts/symbol-parameters-wrapper_deferred.js" defer="defer"></script>
|
|
</head>
|
|
<body>
|
|
<div class="root">
|
|
<nav class="navigation" id="navigation-wrapper">
|
|
<div class="navigation--inner">
|
|
<div class="navigation-title">
|
|
<button class="menu-toggle" id="menu-toggle" type="button">toggle menu</button>
|
|
<div class="library-name">
|
|
<a class="library-name--link" href="../../../index.html">
|
|
micro_utils.dokka
|
|
</a>
|
|
</div>
|
|
<div class="library-version">
|
|
0.20.46 </div>
|
|
</div>
|
|
<div class="filter-section" id="filter-section">
|
|
<button class="platform-tag platform-selector common-like" data-active="" data-filter=":micro_utils.dokka:dokkaHtml/commonMain">common</button>
|
|
</div>
|
|
</div>
|
|
<div class="navigation-controls">
|
|
<button class="navigation-controls--btn navigation-controls--theme" id="theme-toggle-button" type="button">switch theme</button>
|
|
<div class="navigation-controls--btn navigation-controls--search" id="searchBar" role="button">search in API</div>
|
|
</div>
|
|
</nav>
|
|
<div id="container">
|
|
<div class="sidebar" id="leftColumn">
|
|
<div class="sidebar--inner" id="sideMenu"></div>
|
|
</div>
|
|
<div id="main">
|
|
<div class="main-content" data-page-type="classlike" id="content" pageIds="micro_utils.dokka::dev.inmo.micro_utils.common/Optional///PointingToDeclaration//-1478683138">
|
|
<div class="breadcrumbs"><a href="../../../index.html">micro_utils.dokka</a><span class="delimiter">/</span><a href="../index.html">dev.inmo.micro_utils.common</a><span class="delimiter">/</span><span class="current">Optional</span></div>
|
|
<div class="cover ">
|
|
<h1 class="cover"><span><span>Optional</span></span></h1>
|
|
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><span data-unresolved-link="kotlinx.serialization/Serializable///PointingToDeclaration/"><span class="token annotation builtin">Serializable</span></span></div></div><span class="token keyword">data </span><span class="token keyword">class </span><a href="index.html">Optional</a><span class="token operator"><</span><a href="index.html">T</a><span class="token operator">></span><span class="clearfix"><span class="floating-right">(<a href="https://github.com/InsanusMokrassar/MicroUtils/blob/master//common/src/commonMain/kotlin/dev/inmo/micro_utils/common/Optional.kt#L23">source</a>)</span></span></div><p class="paragraph">This type represents <a href="index.html">T</a> as not only potentially nullable data, but also as a data which can not be presented. This type will be useful in cases when <a href="index.html">T</a> is nullable and null as valuable data too in time of data absence should be presented by some third type.</p><p class="paragraph">Let's imagine, you have nullable name in some database. In case when name is not nullable everything is clear - null will represent absence of row in the database. In case when name is nullable null will be a little bit dual-meaning, cause this null will say nothing about availability of the row (of course, it is exaggerated example)</p><h4 class="">See also</h4><div class="table"><div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><a href="-companion/presented.html"><span>Optional.</span><wbr></wbr><span>Companion.</span><wbr></wbr><span>presented</span></a></div></span></div><div></div></div></div><div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><a href="-companion/absent.html"><span>Optional.</span><wbr></wbr><span>Companion.</span><wbr></wbr><span>absent</span></a></div></span></div><div></div></div></div><div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><span data-unresolved-link="dev.inmo.micro_utils.common//optional/dev.inmo.micro_utils.common.Optional[TypeParam(bounds=[kotlin.Any?])]#/PointingToDeclaration/"><span><span>optional</span></span></span></div></span></div><div></div></div></div><div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><a href="../on-presented.html"><span>on</span><wbr></wbr><span><span>Presented</span></span></a></div></span></div><div></div></div></div><div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><a href="../on-absent.html"><span>on</span><wbr></wbr><span><span>Absent</span></span></a></div></span></div><div></div></div></div></div></div></div>
|
|
</div>
|
|
<div class="tabbedcontent">
|
|
<div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="CONSTRUCTOR,TYPE,PROPERTY,FUNCTION">Members</button><button class="section-tab" data-togglable="CONSTRUCTOR,TYPE,PROPERTY,FUNCTION,EXTENSION_PROPERTY,EXTENSION_FUNCTION">Members & Extensions</button></div>
|
|
<div class="tabs-section-body">
|
|
<div data-togglable="TYPE">
|
|
<h2 class="">Types</h2>
|
|
<div class="table"><a data-name="-503622347%2FClasslikes%2F-1478683138" anchor-label="Companion" id="-503622347%2FClasslikes%2F-1478683138" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"></a>
|
|
<div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain">
|
|
<div class="main-subrow keyValue ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="-companion/index.html"><span><span>Companion</span></span></a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-503622347%2FClasslikes%2F-1478683138"></span>
|
|
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
|
|
</span></span></div>
|
|
<div>
|
|
<div class="title">
|
|
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">object </span><a href="-companion/index.html">Companion</a></div></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div data-togglable="PROPERTY">
|
|
<h2 class="">Properties</h2>
|
|
<div class="table"><a data-name="-1373844350%2FProperties%2F-1478683138" anchor-label="data" id="-1373844350%2FProperties%2F-1478683138" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"></a>
|
|
<div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain">
|
|
<div class="main-subrow keyValue ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="data.html"><span><span>data</span></span></a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1373844350%2FProperties%2F-1478683138"></span>
|
|
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
|
|
</span></span></div>
|
|
<div>
|
|
<div class="title">
|
|
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="data.html">data</a><span class="token operator">: </span><a href="index.html">T</a><span class="token operator">?</span></div></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<a data-name="1174995806%2FProperties%2F-1478683138" anchor-label="dataPresented" id="1174995806%2FProperties%2F-1478683138" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"></a>
|
|
<div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain">
|
|
<div class="main-subrow keyValue ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="data-presented.html"><span>data</span><wbr></wbr><span><span>Presented</span></span></a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1174995806%2FProperties%2F-1478683138"></span>
|
|
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
|
|
</span></span></div>
|
|
<div>
|
|
<div class="title">
|
|
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="data-presented.html">dataPresented</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></div></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div data-togglable="EXTENSION_FUNCTION">
|
|
<h2 class="">Functions</h2>
|
|
<div class="table"><a data-name="266058348%2FFunctions%2F-1478683138" anchor-label="dataOrElse" id="266058348%2FFunctions%2F-1478683138" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"></a>
|
|
<div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain">
|
|
<div class="main-subrow keyValue ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="../data-or-else.html"><span>data</span><wbr></wbr><span>Or</span><wbr></wbr><span><span>Else</span></span></a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="266058348%2FFunctions%2F-1478683138"></span>
|
|
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
|
|
</span></span></div>
|
|
<div>
|
|
<div class="title">
|
|
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">inline </span><span class="token keyword">fun </span><span class="token operator"><</span><a href="../data-or-else.html">T</a><span class="token operator">> </span><a href="index.html">Optional</a><span class="token operator"><</span><a href="../data-or-else.html">T</a><span class="token operator">></span><span class="token punctuation">.</span><a href="../data-or-else.html"><span class="token function">dataOrElse</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">block<span class="token operator">: </span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -> </span><a href="../data-or-else.html">T</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../data-or-else.html">T</a></div><div class="brief "><p class="paragraph">Returns <a href="data.html">Optional.data</a> if <a href="data-presented.html">Optional.dataPresented</a> of <span data-unresolved-link="dev.inmo.micro_utils.common//&lt;this&gt;/#/PointingToCallableParameters(-1)/">this</span> is true, or call <a href="../data-or-else.html">block</a> and returns the result of it</p></div></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<a data-name="-740158821%2FFunctions%2F-1478683138" anchor-label="dataOrNull" id="-740158821%2FFunctions%2F-1478683138" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"></a>
|
|
<div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain">
|
|
<div class="main-subrow keyValue ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="../data-or-null.html"><span>data</span><wbr></wbr><span>Or</span><wbr></wbr><span><span>Null</span></span></a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-740158821%2FFunctions%2F-1478683138"></span>
|
|
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
|
|
</span></span></div>
|
|
<div>
|
|
<div class="title">
|
|
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><span class="token operator"><</span><a href="../data-or-null.html">T</a><span class="token operator">> </span><a href="index.html">Optional</a><span class="token operator"><</span><a href="../data-or-null.html">T</a><span class="token operator">></span><span class="token punctuation">.</span><a href="../data-or-null.html"><span class="token function">dataOrNull</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../data-or-null.html">T</a><span class="token operator">?</span></div><div class="brief "><p class="paragraph">Returns <a href="data.html">Optional.data</a> if <a href="data-presented.html">Optional.dataPresented</a> of <span data-unresolved-link="dev.inmo.micro_utils.common//&lt;this&gt;/#/PointingToCallableParameters(-1)/">this</span> is true, or null otherwise</p></div></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<a data-name="1247045035%2FFunctions%2F-1478683138" anchor-label="dataOrThrow" id="1247045035%2FFunctions%2F-1478683138" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"></a>
|
|
<div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain">
|
|
<div class="main-subrow keyValue ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="../data-or-throw.html"><span>data</span><wbr></wbr><span>Or</span><wbr></wbr><span><span>Throw</span></span></a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1247045035%2FFunctions%2F-1478683138"></span>
|
|
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
|
|
</span></span></div>
|
|
<div>
|
|
<div class="title">
|
|
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><span class="token operator"><</span><a href="../data-or-throw.html">T</a><span class="token operator">> </span><a href="index.html">Optional</a><span class="token operator"><</span><a href="../data-or-throw.html">T</a><span class="token operator">></span><span class="token punctuation">.</span><a href="../data-or-throw.html"><span class="token function">dataOrThrow</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">throwable<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">Throwable</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../data-or-throw.html">T</a></div><div class="brief "><p class="paragraph">Returns <a href="data.html">Optional.data</a> if <a href="data-presented.html">Optional.dataPresented</a> of <span data-unresolved-link="dev.inmo.micro_utils.common//&lt;this&gt;/#/PointingToCallableParameters(-1)/">this</span> is true, or throw <a href="../data-or-throw.html">throwable</a> otherwise</p></div></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<a data-name="751780544%2FFunctions%2F-1478683138" anchor-label="mapOnAbsent" id="751780544%2FFunctions%2F-1478683138" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"></a>
|
|
<div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain">
|
|
<div class="main-subrow keyValue ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="../map-on-absent.html"><span>map</span><wbr></wbr><span>On</span><wbr></wbr><span><span>Absent</span></span></a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="751780544%2FFunctions%2F-1478683138"></span>
|
|
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
|
|
</span></span></div>
|
|
<div>
|
|
<div class="title">
|
|
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">inline </span><span class="token keyword">fun </span><span class="token operator"><</span><a href="../map-on-absent.html">T</a><span class="token punctuation">, </span><a href="../map-on-absent.html">R</a><span class="token operator">> </span><a href="index.html">Optional</a><span class="token operator"><</span><a href="../map-on-absent.html">T</a><span class="token operator">></span><span class="token punctuation">.</span><a href="../map-on-absent.html"><span class="token function">mapOnAbsent</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">block<span class="token operator">: </span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -> </span><a href="../map-on-absent.html">R</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../map-on-absent.html">R</a><span class="token operator">?</span></div><div class="brief "><p class="paragraph">Will call <a href="../map-on-absent.html">block</a> when data presented (<a href="data-presented.html">Optional.dataPresented</a> == true)</p></div></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<a data-name="1620645484%2FFunctions%2F-1478683138" anchor-label="mapOnPresented" id="1620645484%2FFunctions%2F-1478683138" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"></a>
|
|
<div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain">
|
|
<div class="main-subrow keyValue ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="../map-on-presented.html"><span>map</span><wbr></wbr><span>On</span><wbr></wbr><span><span>Presented</span></span></a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1620645484%2FFunctions%2F-1478683138"></span>
|
|
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
|
|
</span></span></div>
|
|
<div>
|
|
<div class="title">
|
|
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">inline </span><span class="token keyword">fun </span><span class="token operator"><</span><a href="../map-on-presented.html">T</a><span class="token punctuation">, </span><a href="../map-on-presented.html">R</a><span class="token operator">> </span><a href="index.html">Optional</a><span class="token operator"><</span><a href="../map-on-presented.html">T</a><span class="token operator">></span><span class="token punctuation">.</span><a href="../map-on-presented.html"><span class="token function">mapOnPresented</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">block<span class="token operator">: </span><span class="token punctuation">(</span><a href="../map-on-presented.html">T</a><span class="token punctuation">)</span><span class="token operator"> -> </span><a href="../map-on-presented.html">R</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../map-on-presented.html">R</a><span class="token operator">?</span></div><div class="brief "><p class="paragraph">Will call <a href="../map-on-presented.html">block</a> when data presented (<a href="data-presented.html">Optional.dataPresented</a> == true)</p></div></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<a data-name="-1291152217%2FFunctions%2F-1478683138" anchor-label="onAbsent" id="-1291152217%2FFunctions%2F-1478683138" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"></a>
|
|
<div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain">
|
|
<div class="main-subrow keyValue ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="../on-absent.html"><span>on</span><wbr></wbr><span><span>Absent</span></span></a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1291152217%2FFunctions%2F-1478683138"></span>
|
|
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
|
|
</span></span></div>
|
|
<div>
|
|
<div class="title">
|
|
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">inline </span><span class="token keyword">fun </span><span class="token operator"><</span><a href="../on-absent.html">T</a><span class="token operator">> </span><a href="index.html">Optional</a><span class="token operator"><</span><a href="../on-absent.html">T</a><span class="token operator">></span><span class="token punctuation">.</span><a href="../on-absent.html"><span class="token function">onAbsent</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">block<span class="token operator">: </span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -> </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="index.html">Optional</a><span class="token operator"><</span><a href="../on-absent.html">T</a><span class="token operator">></span></div><div class="brief "><p class="paragraph">Will call <a href="../on-absent.html">block</a> when data absent (<a href="data-presented.html">Optional.dataPresented</a> == false)</p></div></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<a data-name="-1318449249%2FFunctions%2F-1478683138" anchor-label="onPresented" id="-1318449249%2FFunctions%2F-1478683138" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"></a>
|
|
<div class="table-row" data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain" data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain">
|
|
<div class="main-subrow keyValue ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="../on-presented.html"><span>on</span><wbr></wbr><span><span>Presented</span></span></a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1318449249%2FFunctions%2F-1478683138"></span>
|
|
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
|
|
</span></span></div>
|
|
<div>
|
|
<div class="title">
|
|
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">inline </span><span class="token keyword">fun </span><span class="token operator"><</span><a href="../on-presented.html">T</a><span class="token operator">> </span><a href="index.html">Optional</a><span class="token operator"><</span><a href="../on-presented.html">T</a><span class="token operator">></span><span class="token punctuation">.</span><a href="../on-presented.html"><span class="token function">onPresented</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">block<span class="token operator">: </span><span class="token punctuation">(</span><a href="../on-presented.html">T</a><span class="token punctuation">)</span><span class="token operator"> -> </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="index.html">Optional</a><span class="token operator"><</span><a href="../on-presented.html">T</a><span class="token operator">></span></div><div class="brief "><p class="paragraph">Will call <a href="../on-presented.html">block</a> when data presented (<a href="data-presented.html">Optional.dataPresented</a> == true)</p></div></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2024 Copyright</span><span
|
|
class="pull-right"><span>Generated by </span><a
|
|
href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|