In package com.eden.orchid.utilities

class com.eden.orchid.utilities.LRUCache

Fields

size: Int

Constructors

constructor(delegate: Cache, maxSize: Int)
Parameters:
  • delegate: Cache
  • maxSize: Int

Methods

fun set(key: T, value: U)
Parameters:
  • key: T
  • value: U
fun remove(key: T): U?
Parameters:
  • key: T
fun get(key: T): U?
Parameters:
  • key: T
fun containsKey(key: T): Boolean
Parameters:
  • key: T
fun clear()
Parameters:
  • No parameters

Extensions

fun <T, U> Cache.computeIfAbsent(key: T, loader: ()->U): U?
Parameters:
  • key: T
  • loader: ()->U