Package io.vavr.control
Class Try.WithResources3<T1 extends java.lang.AutoCloseable,T2 extends java.lang.AutoCloseable,T3 extends java.lang.AutoCloseable>
- java.lang.Object
-
- io.vavr.control.Try.WithResources3<T1,T2,T3>
-
- Type Parameters:
T1
- Type of the 1st resource.T2
- Type of the 2nd resource.T3
- Type of the 3rd resource.
public static final class Try.WithResources3<T1 extends java.lang.AutoCloseable,T2 extends java.lang.AutoCloseable,T3 extends java.lang.AutoCloseable> extends java.lang.Object
ATry
-with-resources builder that operates on threeAutoCloseable
resources.
-
-
Field Summary
Fields Modifier and Type Field Description private CheckedFunction0<? extends T1>
t1Supplier
private CheckedFunction0<? extends T2>
t2Supplier
private CheckedFunction0<? extends T3>
t3Supplier
-
Constructor Summary
Constructors Modifier Constructor Description private
WithResources3(CheckedFunction0<? extends T1> t1Supplier, CheckedFunction0<? extends T2> t2Supplier, CheckedFunction0<? extends T3> t3Supplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Try<R>
of(CheckedFunction3<? super T1,? super T2,? super T3,? extends R> f)
Wraps the result of a computation that may fail in aTry
.
-
-
-
Field Detail
-
t1Supplier
private final CheckedFunction0<? extends T1 extends java.lang.AutoCloseable> t1Supplier
-
t2Supplier
private final CheckedFunction0<? extends T2 extends java.lang.AutoCloseable> t2Supplier
-
t3Supplier
private final CheckedFunction0<? extends T3 extends java.lang.AutoCloseable> t3Supplier
-
-
Constructor Detail
-
WithResources3
private WithResources3(CheckedFunction0<? extends T1> t1Supplier, CheckedFunction0<? extends T2> t2Supplier, CheckedFunction0<? extends T3> t3Supplier)
-
-
Method Detail
-
of
public <R> Try<R> of(CheckedFunction3<? super T1,? super T2,? super T3,? extends R> f)
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 threeAutoClosable
resources.- Returns:
- A new
Try
instance.
-
-