ExpirableMap<K, V extends Expirable> class
Maps K
to the Expirable V
objects. These objects are removed when
expired. K
should have Object.operator== and Object.hashCode
implemented.
Constructors
- ExpirableMap.new({void onExpired(K, V)?})
-
ExpirableMap.of(Map<
K, V> map, {void onExpired(K, V)?})
Properties
Methods
-
clear(
) → void -
containsKey(
K key) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
K key) → V? -
Remove the entry at
key
and return the removed value. Returns null if the key was not in the map. Does not callthis.onExpired
. -
removeWhere(
bool test(K key, V value)) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
K key) → V? - Obtain the object if it is not expired.
-
operator []=(
K key, V value) → void - Adds the object to the map