public class FunctionUtil extends Object
| 构造器和说明 |
|---|
FunctionUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <P1,P2> void |
execute(P1 param1,
P2 param2,
java.util.function.BiConsumer<P1,P2> consumer)
异步方法
|
static void |
execute(Runnable runnable)
异步方法
|
static <T> PresentOrElseHandler<T> |
isBlankOrNoBlank(T t)
参数为空或不为空时,分别进行不同的操作
|
static SingleBranchHandle |
isTrue(boolean flag)
参数为true时,进行操作
|
static BiBranchHandle |
isTrueOrFalse(boolean flag)
参数为true或false时,分别进行不同的操作
|
static <T> BiBranchSupplierHandle<T> |
isTrueOrFalseReValue(boolean flag)
参数为true或false时,分别进行不同的操作
|
static <T> Future<T> |
submit(ExecutorService executorService,
Callable<T> callable)
执行任务
|
static ThrowExceptionConsumer |
throwIsTrue(boolean flag) |
static ThrowMsgExceptionConsumer |
throwMsgIsTrue(boolean flag) |
private static final Executor EXECUTOR
public static void execute(Runnable runnable)
runnable - 回调方法public static <P1,P2> void execute(P1 param1,
P2 param2,
java.util.function.BiConsumer<P1,P2> consumer)
P1 - 参数类型1P2 - 参数类型2param1 - 参数1param2 - 参数2consumer - 回调方法public static <T> Future<T> submit(ExecutorService executorService, Callable<T> callable)
T - 返回的结果集Future泛型executorService - ExecutorServicecallable - 回调public static ThrowMsgExceptionConsumer throwMsgIsTrue(boolean flag)
flag - 条件public static ThrowExceptionConsumer throwIsTrue(boolean flag)
flag - 条件public static BiBranchHandle isTrueOrFalse(boolean flag)
flag - 条件public static <T> BiBranchSupplierHandle<T> isTrueOrFalseReValue(boolean flag)
flag - 条件public static SingleBranchHandle isTrue(boolean flag)
flag - 条件public static <T> PresentOrElseHandler<T> isBlankOrNoBlank(T t)
t - 参数Copyright © 2024. All rights reserved.