public class Branches<P> extends Object
| Modifier and Type | Method and Description |
|---|---|
static <P extends Comparable<P>> |
compared(P v)
工厂函数 比较相等
|
static <P> Branches<P> |
eq(P v)
工厂函数 相等
|
static <P> Branches<P> |
in(P... arr)
工厂函数 包含
|
<R> Branch<P,R> |
then(Function<P,R> factory)
构建分支
|
<R> Branch<P,R> |
then(R r)
构建分支
|
<R> Branch<P,R> |
then(Supplier<R> supplier)
构建分支
|
static <P> Branches<P> |
when(Predicate<P> tester)
工厂函数
|
public <R> Branch<P,R> then(Function<P,R> factory)
R - Rfactory - factoryBranchpublic <R> Branch<P,R> then(Supplier<R> supplier)
R - Rsupplier - supplierBranchpublic <R> Branch<P,R> then(R r)
R - Rr - resultBranchpublic static <P> Branches<P> when(Predicate<P> tester)
P - Ptester - 测试器Branchespublic static <P> Branches<P> eq(P v)
P - Pv - valueBranchespublic static <P extends Comparable<P>> Branches<P> compared(P v)
P - Pv - valueBranches@SafeVarargs public static <P> Branches<P> in(P... arr)
P - Parr - inBranchesCopyright © 2025. All rights reserved.