In package com.eden.orchid.utilities

class com.eden.orchid.utilities.Cache

Fields

abstract size: Int

Methods

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

Extensions

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