Adds an asJava
method that wraps a Scala function () => T
in
a Guava Supplier[T]
.
Adds an asJava
method that wraps a Scala function () => T
in
a Guava Supplier[T]
.
The returned Guava Supplier[T]
forwards all calls of the apply
method
to the given Scala function () => T
.
the Scala function () => T
to wrap in a Guava Supplier[T]
An object with an asJava
method that returns a Guava Supplier[T]
view of the argument
Adds an asScala
method that wraps a Guava Supplier[T]
in
a Scala function () => T
.
Adds an asScala
method that wraps a Guava Supplier[T]
in
a Scala function () => T
.
The returned Scala function () => T
forwards all calls of the apply
method
to the given Guava Supplier[T]
.
An object with an asScala
method that returns a Scala function () => T
view of the argument
Returns a function which caches the instance retrieved during the first evaluation and returns that value on subsequent evaluations.
Returns a function which caches the instance retrieved during the first evaluation and returns that value on subsequent evaluations. See: memoization
The returned function is thread-safe. The functions's serialized form does not contain the cached value, which will be recalculated when the reserialized instance is evaluated.
If f
is an instance created by an earlier call to
memoize, it is returned directly.
Returns a supplier that caches the instance supplied by the delegate and removes the cached value after the specified time has passed.
Returns a supplier that caches the instance supplied by the delegate and removes the cached value after the specified time has passed. Subsequent evaluations return the cached value if the expiration time has not passed. After the expiration time, a new value is retrieved, cached, and returned. See: memoization
The returned function is thread-safe. The function's serialized form does not contain the cached value, which will be recalculated when the reserialized instance is evaluated.
the length of time after a value is created that it should stop being returned by subsequent evaluations
the unit that duration
is expressed in
IllegalArgumentException
if duration
is not positive
Returns a function whose apply()
method synchronizes on
f
before calling it, making it thread-safe.
Utility functions for the work with suppliers which are functions of the type
() => T
Usage example for conversion between Guava and Mango:
0.7