public class Builder<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Builder.Consumer1<T,P1>
1 参数 Consumer
|
static interface |
Builder.Consumer2<T,P1,P2>
2 参数 Consumer
|
static interface |
Builder.Consumer3<T,P1,P2,P3>
3 参数 Consumer
|
| Constructor and Description |
|---|
Builder(java.util.function.Supplier<T> instantiator) |
| Modifier and Type | Method and Description |
|---|---|
T |
build() |
static <T> Builder<T> |
of(java.util.function.Supplier<T> instantiator) |
<P1> Builder<T> |
with(Builder.Consumer1<T,P1> consumer,
P1 p1) |
<P1,P2> Builder<T> |
with(Builder.Consumer2<T,P1,P2> consumer,
P1 p1,
P2 p2) |
<P1,P2,P3> Builder<T> |
with(Builder.Consumer3<T,P1,P2,P3> consumer,
P1 p1,
P2 p2,
P3 p3) |
public Builder(java.util.function.Supplier<T> instantiator)
public static <T> Builder<T> of(java.util.function.Supplier<T> instantiator)
public <P1> Builder<T> with(Builder.Consumer1<T,P1> consumer, P1 p1)
public <P1,P2> Builder<T> with(Builder.Consumer2<T,P1,P2> consumer, P1 p1, P2 p2)
public <P1,P2,P3> Builder<T> with(Builder.Consumer3<T,P1,P2,P3> consumer, P1 p1, P2 p2, P3 p3)
public T build()
Copyright © 2021. All rights reserved.