Package com.github.tonivade.purefun.core
Interface Producer<T>
- Type Parameters:
T- the returned type
- All Superinterfaces:
Kind<Producer<?>,,T> ProducerOf<T>,Recoverable
- All Known Implementing Classes:
MemoizedProducer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
This interface represents a function without any parameter. Similar to
Supplier
but with additional functionality like the ability to memoize the result.-
Method Summary
Methods inherited from interface com.github.tonivade.purefun.core.Recoverable
sneakyThrow
-
Method Details
-
get
-
run
- Throws:
Throwable
-
asFunction
-
andThen
-
map
-
flatMap
-
liftOption
-
liftTry
-
liftEither
-
memoized
-
cons
-
failure
-
of
-