MemoizedFunction2<A1, A2, T> class

Class representing a memoized function requiring arguments of type A1 and A2, respectively, and returning an object of type T.

Constructors

MemoizedFunction2(DoubleArgumentFunction<A1, A2, T> func, {Map<A1, Map<A2, T>> functionTable = const {}})
Constructor: The parameter functionTable may be used to initialize the function lookup table with certain {function argument1: {function argument 2: function value pairs} } entries.

Properties

argumentTypes List<Type>
Returns the function argument types [A1, A2].
no setter
func DoubleArgumentFunction<A1, A2, T>
The memoized function.
final
functionTable Map<A1, Map<A2, T>>
Returns a copy of the current function table.
no setter
hashCode int
The hash code for this object.
no setterinherited
returnType Type
Returns the function return type T.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signature Type
Returns the typedef of the memoized function.
no setter

Methods

call(A1 arg1, A2 arg2, {bool recalculate = false}) → T
Returns the result of calling func or a cached result if available.
clearFunctionTable() → void
Clears the cached function table.
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