CachedComputation<R, T, K> class

Caches a value that can be computed.

Constructors

CachedComputation(R function(T), [K keyGenerator(T)?])

Properties

cacheSize → int
no setter
computationCount → int
no setter
function → R Function(T)
final
hashCode → int
The hash code for this object.
no setterinherited
keyGenerator → K? Function(T)
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Clears cache.
compute(T value) → R
Computes and caches value.
generateKey(T value) → K?
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