Package io.vavr.control
Class Try.WithResources4<T1 extends AutoCloseable,T2 extends AutoCloseable,T3 extends AutoCloseable,T4 extends AutoCloseable>
java.lang.Object
io.vavr.control.Try.WithResources4<T1,T2,T3,T4>
- Type Parameters:
T1
- Type of the 1st resource.T2
- Type of the 2nd resource.T3
- Type of the 3rd resource.T4
- Type of the 4th resource.
public static final class Try.WithResources4<T1 extends AutoCloseable,T2 extends AutoCloseable,T3 extends AutoCloseable,T4 extends AutoCloseable>
extends Object
A
Try
-with-resources builder that operates on four AutoCloseable
resources.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CheckedFunction0
<? extends T1> private final CheckedFunction0
<? extends T2> private final CheckedFunction0
<? extends T3> private final CheckedFunction0
<? extends T4> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
WithResources4
(CheckedFunction0<? extends T1> t1Supplier, CheckedFunction0<? extends T2> t2Supplier, CheckedFunction0<? extends T3> t3Supplier, CheckedFunction0<? extends T4> t4Supplier) -
Method Summary
-
Field Details
-
t1Supplier
-
t2Supplier
-
t3Supplier
-
t4Supplier
-
-
Constructor Details
-
WithResources4
private WithResources4(CheckedFunction0<? extends T1> t1Supplier, CheckedFunction0<? extends T2> t2Supplier, CheckedFunction0<? extends T3> t3Supplier, CheckedFunction0<? extends T4> t4Supplier)
-
-
Method Details
-
of
Wraps the result of a computation that may fail in aTry
.- Type Parameters:
R
- Result type of the computation.- Parameters:
f
- A computation that takes fourAutoClosable
resources.- Returns:
- A new
Try
instance.
-