Memoized3<V, A1, A2, A3> class
Represents a memoization wrapper for a computation that takes three arguments
and returns a value of type V
.
This class uses an LRU (Least Recently Used) cache to store results of the computations based on the arguments passed. The cache has a default capacity(128) but can be configured via the constructor.
This is particularly useful for functions where the computation is expensive and you don't want to recompute the value for the same argument multiple times.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
A1 a1, A2 a2, A3 a3) → V -
Calls the wrapped computation with the provided arguments
a1
,a2
anda3
. -
expire(
A1 a1, A2 a2, A3 a3) → void - Removes the cached value associated with the given arguments.
-
expireAll(
) → void - Clears the entire cache, removing all cached values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited