summaryrefslogtreecommitdiff
path: root/api1/pl.treksoft.kvision.utils/-cache/set.html
blob: 1d3c6baa43036308c5e15bc53e086b8ad767d1da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>Cache.set - kvision</title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">kvision</a>&nbsp;/&nbsp;<a href="../index.html">pl.treksoft.kvision.utils</a>&nbsp;/&nbsp;<a href="index.html">Cache</a>&nbsp;/&nbsp;<a href="./set.html">set</a><br/>
<br/>
<h1>set</h1>
<a name="pl.treksoft.kvision.utils.Cache$set(pl.treksoft.kvision.utils.Cache.K, pl.treksoft.kvision.utils.Cache.V)"></a>
<code><span class="keyword">operator</span> <span class="keyword">fun </span><span class="identifier">set</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.utils.Cache$set(pl.treksoft.kvision.utils.Cache.K, pl.treksoft.kvision.utils.Cache.V)/key">key</span><span class="symbol">:</span>&nbsp;<a href="index.html#K"><span class="identifier">K</span></a><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.utils.Cache$set(pl.treksoft.kvision.utils.Cache.K, pl.treksoft.kvision.utils.Cache.V)/value">value</span><span class="symbol">:</span>&nbsp;<a href="index.html#V"><span class="identifier">V</span></a><span class="symbol">)</span><span class="symbol">: </span><a href="index.html#K"><span class="identifier">K</span></a><span class="symbol">?</span></code>
<p><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-hash-map/index.html">HashMap</a> put and remove is O(1).
More info: https://stackoverflow.com/a/4578039/2085356</p>
</BODY>
</HTML>