-
public final class DisposableKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Disposable, R extends Any> Ruse(T $self, Function1<T, R> block)Executes the given block function on this object and then closes it down correctly whether an exception is thrown or not. -
-
Method Detail
-
use
final static <T extends Disposable, R extends Any> R use(T $self, Function1<T, R> block)
Executes the given block function on this object and then closes it down correctly whether an exception is thrown or not.
- Parameters:
block- a function to process this Disposable object.
-
-
-
-