Item

data class Item<K : Any, V : Any>(val key: K, val value: V, val expires: Long) : Comparable<TimeBasedCache.Item<K, V>>

An item in the cache that holds a key, a value, and an expiration time.

Parameters

K

The type of keys maintained by this cache

V

The type of mapped values

Constructors

Link copied to clipboard
constructor(key: K, value: V, expires: Long)

Creates a new item with the specified key, value, and expiration time.

Properties

Link copied to clipboard

The expiration time of this item

Link copied to clipboard
val key: K

The key of this item

Link copied to clipboard
val value: V

The value of this item

Functions

Link copied to clipboard
open operator override fun compareTo(other: TimeBasedCache.Item<K, V>): Int