Package org.zalando.fauxpas
Class TryWith
- java.lang.Object
-
- org.zalando.fauxpas.TryWith
-
public final class TryWith extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <O extends AutoCloseable,I extends AutoCloseable,X extends Throwable>
voidtryWith(O outer, I inner, ThrowingBiConsumer<O,I,X> consumer)static <O extends AutoCloseable,I extends AutoCloseable,T,X extends Throwable>
TtryWith(O outer, I inner, ThrowingBiFunction<O,I,T,X> function)static <R extends AutoCloseable,X extends Throwable>
voidtryWith(R resource, ThrowingConsumer<R,X> consumer)static <R extends AutoCloseable,T,X extends Throwable>
TtryWith(R resource, ThrowingFunction<R,T,X> supplier)
-
-
-
Method Detail
-
tryWith
@API(status=MAINTAINED) public static <O extends AutoCloseable,I extends AutoCloseable,X extends Throwable> void tryWith(@Nullable O outer, @Nullable I inner, ThrowingBiConsumer<O,I,X> consumer) throws X extends Throwable
- Throws:
X extends Throwable
-
tryWith
@API(status=STABLE) public static <R extends AutoCloseable,X extends Throwable> void tryWith(@Nullable R resource, ThrowingConsumer<R,X> consumer) throws X extends Throwable
- Throws:
X extends Throwable
-
tryWith
@API(status=MAINTAINED) public static <O extends AutoCloseable,I extends AutoCloseable,T,X extends Throwable> T tryWith(@Nullable O outer, @Nullable I inner, ThrowingBiFunction<O,I,T,X> function) throws X extends Throwable
- Throws:
X extends Throwable
-
tryWith
@API(status=STABLE) public static <R extends AutoCloseable,T,X extends Throwable> T tryWith(@Nullable R resource, ThrowingFunction<R,T,X> supplier) throws X extends Throwable
- Throws:
X extends Throwable
-
-