Package com.github.phantomthief.util
Class MoreSuppliers.CloseableThrowableSupplier<T,X extends Throwable>
- java.lang.Object
-
- com.github.phantomthief.util.MoreSuppliers.CloseableThrowableSupplier<T,X>
-
- All Implemented Interfaces:
ThrowableSupplier<T,X>,Serializable
- Enclosing class:
- MoreSuppliers
public static class MoreSuppliers.CloseableThrowableSupplier<T,X extends Throwable> extends Object implements ThrowableSupplier<T,X>, Serializable
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tget()<X2 extends Throwable>
voidifPresent(ThrowableConsumer<T,X2> consumer)booleanisInitialized()<U> Optional<U>map(Function<? super T,? extends U> mapper)StringtoString()voidtryClose()<X2 extends Throwable>
voidtryClose(ThrowableConsumer<T,X2> close)
-
-
-
Method Detail
-
isInitialized
public boolean isInitialized()
-
ifPresent
public <X2 extends Throwable> void ifPresent(ThrowableConsumer<T,X2> consumer) throws X2 extends Throwable
- Throws:
X2 extends Throwable
-
tryClose
public void tryClose()
-
tryClose
public <X2 extends Throwable> void tryClose(ThrowableConsumer<T,X2> close) throws X2 extends Throwable
- Throws:
X2 extends Throwable
-
-