类 CachedConfigValue<T,U>
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<T,U>
- 直接已知子类:
ConfiguredList,ConfiguredMap,ConfiguredValue
-
字段概要
字段从类继承的字段 cc.carm.lib.configuration.value.ValueManifest
defaultSupplier, holder, initializer, path, type, validator -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanprotected TGet the cached value or the default value if the cached value is nullprotected TgetCachedOrDefault(T emptyValue) Get the cached value or the default value if the cached value is nullprotected final TgetDefaultFirst(T value) protected <O> @Nullable ValueParser<O>parserFor(@NotNull ValueAdapter<O> adapter) protected <O> @Nullable ValueSerializer<O>serializerFor(@NotNull ValueAdapter<O> adapter) protected TupdateCache(T value) 从类继承的方法 cc.carm.lib.configuration.value.ConfigValue
get, getNotNull, getOrDefault, isDefault, optional, resolve, save, set, 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
-
字段详细资料
-
cachedValue
-
parsedTime
protected long parsedTime
-
-
构造器详细资料
-
CachedConfigValue
-
-
方法详细资料
-
updateCache
-
getCachedValue
-
cacheExpired
public boolean cacheExpired() -
getDefaultFirst
-
getCachedOrDefault
Get the cached value or the default value if the cached value is null- 返回:
- the cached value or the default value
-
getCachedOrDefault
Get the cached value or the default value if the cached value is null- 参数:
emptyValue- the value to return if the cached value and the default value are null- 返回:
- the cached value or the default value
-
parserFor
@Nullable protected <O> @Nullable ValueParser<O> parserFor(@NotNull @NotNull ValueAdapter<O> adapter) - 类型参数:
O- Base object type- 参数:
adapter- Value adapter- 返回:
- Value's parser, parse base object to value.
-
serializerFor
@Nullable protected <O> @Nullable ValueSerializer<O> serializerFor(@NotNull @NotNull ValueAdapter<O> adapter) - 类型参数:
O- Base object type- 参数:
adapter- Value adapter- 返回:
- Value's serializer, parse value to base object.
-