T1
- Type of the 1st resource.public static final class Try.WithResources1<T1 extends AutoCloseable> extends Object
Try
-with-resources builder that operates on one AutoCloseable
resource.Modifier and Type | Method and Description |
---|---|
<R> Try<R> |
of(CheckedFunction1<? super T1,? extends R> f)
Wraps the result of a computation that may fail in a
Try . |
public <R> Try<R> of(CheckedFunction1<? super T1,? extends R> f)
Try
.R
- Result type of the computation.f
- A computation that takes one AutoClosable
resource.Try
instance.Copyright © 2021. All Rights Reserved.