AbstractBuilderContext

abstract class AbstractBuilderContext<B>(val builderFactory: () -> B)(source)

Inheritors

Constructors

Link copied to clipboard
constructor(builderFactory: () -> B)

Properties

Link copied to clipboard
open val builder: B
Link copied to clipboard
val builderFactory: () -> B
Link copied to clipboard
Link copied to clipboard
open var nextIsNew: Boolean

标记下一次再获取 builder 时必须新建。

Functions

Link copied to clipboard
inline fun builderOrNew(check: (B) -> Boolean): B

如果符合 check 的条件,得到 builder, 否则使用 newBuilder 构建一个新的builder。

Link copied to clipboard
open fun newBuilder(): B