| 程序包 | 说明 |
|---|---|
| cn.crane4j.core.util |
| 限定符和类型 | 方法和说明 |
|---|---|
static <R> Try<R> |
Try.failure(Throwable ex)
Create a failed action.
|
Try<T> |
Try.getOrElseTry(CheckedFunction<Throwable,T> function)
Get this or the other instance if this action is failed.
|
static Try<Void> |
Try.of(CheckedRunnable runnable)
Create an action that does nothing.
|
static <R> Try<R> |
Try.of(CheckedSupplier<R> supplier)
Create an action that does nothing and returns a result.
|
Try<T> |
Try.subscribeFailure(Consumer<Throwable> subscriber)
Subscribe the result.
|
Try<T> |
Try.subscribeSuccess(Consumer<T> subscriber)
Subscribe the result.
|
static <R> Try<R> |
Try.success(R result)
Create a successful action.
|
Copyright © 2024. All rights reserved.