SimpleStorage<K, V> class

Implemented types

Constructors

SimpleStorage({OnEvict<K, V>? onEvict})

Properties

entries List<CacheEntry<K, V>>
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
keys List<K>
no setteroverride
length int
no setteroverride
onEvict OnEvict<K, V>?
if onEvict is set that method is called whenever an entry is removed from the cache. At the time the method is called the entry is already removed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
override
containsKey(K key) bool
override
get(K key) CacheEntry<K, V>?
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(K key) CacheEntry<K, V>?
removes the entry at position key. Returns the entry or null
override
set(K key, CacheEntry<K, V> value) Storage
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](K key) CacheEntry<K, V>?
override
operator []=(K key, CacheEntry<K, V> value) → void
override