类 AbstractConfigBuilder<TYPE,UNIT,RESULT extends ConfigValue<TYPE,UNIT>,HOLDER extends ConfigurationHolder<?>,SELF extends AbstractConfigBuilder<TYPE,UNIT,RESULT,HOLDER,SELF>>
java.lang.Object
cc.carm.lib.configuration.builder.AbstractConfigBuilder<TYPE,UNIT,RESULT,HOLDER,SELF>
@NotNullByDefault
public abstract class AbstractConfigBuilder<TYPE,UNIT,RESULT extends ConfigValue<TYPE,UNIT>,HOLDER extends ConfigurationHolder<?>,SELF extends AbstractConfigBuilder<TYPE,UNIT,RESULT,HOLDER,SELF>>
extends Object
-
字段概要
字段修饰符和类型字段说明protected HOLDERprotected @NotNull BiConsumer<ConfigurationHolder<?>,String> protected @Nullable Stringprotected @NotNull ValueValidator<UNIT> -
构造器概要
构造器限定符构造器说明protectedAbstractConfigBuilder(Class<? super HOLDER> providerClass, ValueType<TYPE> type) -
方法概要
修饰符和类型方法说明append(@NotNull BiConsumer<ConfigurationHolder<?>, String> initializer) append(@NotNull Consumer<ConfigurationHolder<?>> initializer) abstract RESULTbuild()protected @NotNull ValueManifest<TYPE,UNIT> initializer(@NotNull BiConsumer<ConfigurationHolder<?>, String> initializer) <M> SELFmeta(@NotNull ConfigurationMetadata<M> type, M value) meta(@NotNull Consumer<@NotNull ConfigurationMetaHolder> metaConsumer) protected abstract SELFself()type()validate(@NotNull DataValidator<? super UNIT> validator) Validate the value with the specified condition.validate(@NotNull ValueValidator<? super UNIT> validator) Validate the value with the specified condition.Validate the value with the specified condition.Validate the value with the specified condition.validator(@NotNull DataValidator<? super UNIT> validator) Set theDataValidatorfor the value.validator(@NotNull ValueValidator<UNIT> validator) Set theValueValidatorfor the value.
-
字段详细资料
-
providerClass
-
type
-
holder
-
path
-
valueValidator
-
defaultValueSupplier
-
initializer
-
-
构造器详细资料
-
AbstractConfigBuilder
-
-
方法详细资料
-
type
-
self
-
build
-
holder
-
path
-
validator
Set theValueValidatorfor the value.- 参数:
validator- The validator to set.- 返回:
- this builder
-
validator
Set theDataValidatorfor the value.- 参数:
validator- The validator to set.- 返回:
- this builder
-
validate
Validate the value with the specified condition.- 参数:
validator- The validator to append.- 返回:
- this builder
-
validate
Validate the value with the specified condition.- 参数:
validator- The validator to append.- 返回:
- this builder
-
validate
public SELF validate(@NotNull @NotNull Predicate<? super UNIT> condition, @NotNull @NotNull Exception exception) Validate the value with the specified condition.- 参数:
condition- The condition to check, if the condition is false, an exception will be thrown.exception- The exception to throw if the condition is false.- 返回:
- this builder
-
validate
public SELF validate(@NotNull @NotNull Predicate<? super UNIT> condition, @NotNull @NotNull String msg) Validate the value with the specified condition.- 参数:
condition- The condition to check, if the condition is false, an exception will be thrown.msg- The message to throw if the condition is false.- 返回:
- this builder
-
initializer
-
append
-
append
-
defaults
-
defaults
-
meta
-
meta
-
buildManifest
-