Package org.cactoos
Interface Func<X,Y>
-
- Type Parameters:
X
- Type of inputY
- Type of output
- All Known Subinterfaces:
Fallback<X>
- All Known Implementing Classes:
Async
,Chained
,CheckedFunc
,Fallback.From
,Fallback.None
,Flattened
,FuncEnvelope
,FuncNoNulls
,FuncOf
,FuncWithFallback
,IoCheckedFunc
,Repeated
,Retry
,SolidFunc
,StickyFunc
,SyncFunc
,Timed
,UncheckedFunc
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Func<X,Y>
Function.If you don't want to have any checked exceptions being thrown out of your
Func
, you can useUncheckedFunc
decorator. Also you may tryIoCheckedFunc
.If you want to cache the result of the
Func
and make sure it doesn't calculate anything twice, you can useStickyFunc
decorator.There is no thread-safety guarantee.
- Since:
- 0.1
- See Also:
StickyFunc
,UncheckedFunc
,IoCheckedFunc
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Y
apply(X input)
Apply it.
-