类 ConfiguredValue<V>
java.lang.Object
cc.carm.lib.configuration.value.ValueManifest<T,U>
cc.carm.lib.configuration.value.ConfigValue<T,U>
cc.carm.lib.configuration.value.impl.CachedConfigValue<V,V>
cc.carm.lib.configuration.value.standard.ConfiguredValue<V>
- 直接已知子类:
ConfiguredText
-
字段概要
字段从类继承的字段 cc.carm.lib.configuration.value.impl.CachedConfigValue
cachedValue, parsedTime从类继承的字段 cc.carm.lib.configuration.value.ValueManifest
defaultSupplier, holder, initializer, path, type, validator -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明@NotNull ValueAdapter<V>adapter()static <V> ConfigValueBuilder<V>Create a new value builder.static <V> ConfigValueBuilder<V>Create a new value builder.get()Gets the configured value (i.e., the value read from the source).static <V> ConfiguredValue<V>static <V> ConfiguredValue<V>static <V> ConfiguredValue<V>of(@NotNull ValueManifest<V, V> manifest, @NotNull ValueAdapter<V> adapter) static <V> ConfiguredValue<V>of(@NotNull ValueManifest<V, V> manifest, @Nullable ValueParser<V> parser, @Nullable ValueSerializer<V> serializer) static <V> ConfiguredValue<V>static <V> ConfiguredValue<V>static <V> ConfiguredValue<V>static <V> ConfiguredValue<V>of(V defaults) @Nullable ValueParser<V>parser()@Nullable ValueSerializer<V>voidSet the value of the configuration path.static <V> SourceValueBuilder<V,V> Create a new value builder with the specifiedConfigurationHolder.registeredValues()type.static <V> SourceValueBuilder<V,V> Create a new value builder with the specifiedConfigurationHolder.registeredValues()type.从类继承的方法 cc.carm.lib.configuration.value.impl.CachedConfigValue
cacheExpired, getCachedOrDefault, getCachedOrDefault, getCachedValue, getDefaultFirst, parserFor, serializerFor, updateCache从类继承的方法 cc.carm.lib.configuration.value.ConfigValue
getNotNull, getOrDefault, isDefault, optional, resolve, save, setDefault, setDefault从类继承的方法 cc.carm.lib.configuration.value.ValueManifest
config, defaults, defaults, defaults, getData, hasDefaults, holder, holder, initialize, initialize, metadata, path, path, setData, throwing, throwing, type, validate, validator, validator, withValidated
-
字段详细资料
-
adapter
-
-
构造器详细资料
-
ConfiguredValue
public ConfiguredValue(@NotNull @NotNull ValueManifest<V, V> manifest, @NotNull @NotNull ValueAdapter<V> adapter)
-
-
方法详细资料
-
builderOf
Create a new value builder.- 类型参数:
V- The type of the value.- 参数:
type- The type of the value.- 返回:
- a
ConfigValueBuilderwith the specified type.
-
builderOf
Create a new value builder.- 类型参数:
V- The type of the value.- 参数:
type- The type of the value.- 返回:
- a
ConfigValueBuilderwith the specified type.
-
with
Create a new value builder with the specifiedConfigurationHolder.registeredValues()type.- 类型参数:
V- The type of the value.- 参数:
registeredType- The type of the value.- 返回:
- a
SourceValueBuilderwith the specified registered type. - 另请参阅:
-
with
Create a new value builder with the specifiedConfigurationHolder.registeredValues()type.- 类型参数:
V- The type of the value.- 参数:
registeredType- The type of the value.- 返回:
- a
SourceValueBuilderwith the specified registered type. - 另请参阅:
-
of
-
of
-
of
-
of
public static <V> ConfiguredValue<V> of(@NotNull @NotNull Class<V> type, @NotNull @NotNull Supplier<@Nullable V> defaultSupplier) -
of
-
of
public static <V> ConfiguredValue<V> of(@NotNull @NotNull ValueType<V> type, @NotNull @NotNull Supplier<@Nullable V> defaultSupplier) -
of
public static <V> ConfiguredValue<V> of(@NotNull @NotNull ValueManifest<V, V> manifest, @Nullable @Nullable ValueParser<V> parser, @Nullable @Nullable ValueSerializer<V> serializer) -
of
public static <V> ConfiguredValue<V> of(@NotNull @NotNull ValueManifest<V, V> manifest, @NotNull @NotNull ValueAdapter<V> adapter) -
adapter
- 返回:
- Adapter of this value.
-
parser
- 返回:
- Value's parser, parse base object to value.
-
serializer
- 返回:
- Value's serializer, parse value to base object.
-
get
从类复制的说明:ConfigValueGets the configured value (i.e., the value read from the source).
If no default value was written during initialization, you can use theConfigValue.getOrDefault()method to obtain the default value when this value is empty.- 指定者:
get在类中ConfigValue<V,V> - 返回:
- Configured value
-
set
Set the value of the configuration path. Will useserializer()to serialize the value.- 指定者:
set在类中ConfigValue<V,V> - 参数:
value- The value to be set
-