From 8449ff519f3d853ca82c792dccf12d06fb09b627 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 24 Apr 2019 23:12:48 +0200 Subject: API documentation for KVision 0.0.35 --- api/pl.treksoft.kvision.utils/-cache/index.html | 78 +++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 api/pl.treksoft.kvision.utils/-cache/index.html (limited to 'api/pl.treksoft.kvision.utils/-cache/index.html') diff --git a/api/pl.treksoft.kvision.utils/-cache/index.html b/api/pl.treksoft.kvision.utils/-cache/index.html new file mode 100644 index 00000000..15c207b0 --- /dev/null +++ b/api/pl.treksoft.kvision.utils/-cache/index.html @@ -0,0 +1,78 @@ + + + +Cache - kvision + + + +kvision / pl.treksoft.kvision.utils / Cache
+
+

Cache

+class Cache<K, V> +

This is a LRU cache that has no performance impact for cache insertions +once the capacity of the cache has been reached. For cache hit, +performance is O(1) and for cache eviction, it is O(1).

+

Constructors

+ + + + + + + +
+

<init>

+
+Cache(capacity: Int = 50) +

This is a LRU cache that has no performance impact for cache insertions +once the capacity of the cache has been reached. For cache hit, +performance is O(1) and for cache eviction, it is O(1).

+
+

Functions

+ + + + + + + + + + + + + + + +
+

get

+
+operator fun get(key: K): V? +

HashMap get is O(1). +More info: https://stackoverflow.com/a/4578039/2085356

+
+

set

+
+operator fun set(key: K, value: V): K? +

HashMap put and remove is O(1). +More info: https://stackoverflow.com/a/4578039/2085356

+
+

toString

+
+fun toString(): String
+

Extension Functions

+ + + + + + + +
+

createInstance

+
+fun <T> Any?.createInstance(vararg args: dynamic): T +

Helper function for creating JavaScript objects from dynamic constructors.

+
+ + -- cgit