Package io.vavr.control
Class Try.WithResources1<T1 extends AutoCloseable>
java.lang.Object
io.vavr.control.Try.WithResources1<T1>
- Type Parameters:
T1
- Type of the 1st resource.
A
Try
-with-resources builder that operates on one AutoCloseable
resource.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> Try
<R> of
(CheckedFunction1<? super T1, ? extends R> f) Wraps the result of a computation that may fail in aTry
.
-
Field Details
-
t1Supplier
-
-
Constructor Details
-
WithResources1
-
-
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 oneAutoClosable
resource.- Returns:
- A new
Try
instance.
-