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)
factory
- factoryBranch
public <R> Branch<P,R> then(Supplier<R> supplier)
supplier
- supplierBranch
public static <P> Branches<P> when(Predicate<P> tester)
P
- Ptester
- 测试器Branches
public static <P> Branches<P> eq(P v)
P
- Pv
- valueBranches
public static <P extends Comparable<P>> Branches<P> compared(P v)
P
- Pv
- valueBranches
@SafeVarargs public static <P> Branches<P> in(P... arr)
P
- Parr
- inBranches
Copyright © 2024. All rights reserved.