public final class ConvertedConfig extends ConfigWrapper<C>
Config.Entryconfig| Constructor and Description |
|---|
ConvertedConfig(Config config,
ConversionTable readTable,
ConversionTable writeTable,
java.util.function.Predicate<java.lang.Class<?>> supportPredicate)
Creates a new ConvertedConfig that uses two conversion tables.
|
ConvertedConfig(Config config,
java.util.function.Function<java.lang.Object,java.lang.Object> readConversion,
java.util.function.Function<java.lang.Object,java.lang.Object> writeConversion,
java.util.function.Predicate<java.lang.Class<?>> supportPredicate)
Creates a new ConvertedConfig that uses two custom conversion functions.
|
| Modifier and Type | Method and Description |
|---|---|
ConfigFormat<?> |
configFormat()
Returns the config's format.
|
java.util.Set<? extends Config.Entry> |
entrySet()
Returns a Set view of the config's entries.
|
<T> T |
getRaw(java.util.List<java.lang.String> path)
Gets a value from the config.
|
<T> T |
set(java.util.List<java.lang.String> path,
java.lang.Object value)
Sets a config value.
|
java.lang.String |
toString() |
java.util.Map<java.lang.String,java.lang.Object> |
valueMap()
Returns a Map view of the config's values.
|
add, clear, createSubConfig, removecontains, equals, hashCode, isEmpty, sizeclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, add, addAll, checked, clear, concurrentCopy, concurrentCopy, copy, copy, copy, copy, createSubConfig, getDefaultMapCreator, getDefaultMapCreator, inMemory, inMemoryConcurrent, inMemoryUniversal, inMemoryUniversalConcurrent, isInsertionOrderPreserved, of, of, ofConcurrent, putAll, remove, remove, removeAll, set, setInsertionOrderPreserved, unmodifiable, update, update, wrapapply, apply, contains, contains, get, get, getByte, getByte, getByteOrElse, getByteOrElse, getChar, getChar, getCharOrElse, getCharOrElse, getEnum, getEnum, getEnum, getEnum, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getInt, getInt, getIntOrElse, getIntOrElse, getIntOrElse, getIntOrElse, getLong, getLong, getLongOrElse, getLongOrElse, getLongOrElse, getLongOrElse, getOptional, getOptional, getOptionalEnum, getOptionalEnum, getOptionalEnum, getOptionalEnum, getOptionalInt, getOptionalInt, getOptionalLong, getOptionalLong, getOrElse, getOrElse, getOrElse, getOrElse, getRaw, getShort, getShort, getShortOrElse, getShortOrElse, isEmpty, isNull, isNull, sizepublic ConvertedConfig(Config config, ConversionTable readTable, ConversionTable writeTable, java.util.function.Predicate<java.lang.Class<?>> supportPredicate)
config - the config to wrapreadTable - the ConversionTable used for parse operations (like getValue)writeTable - the ConversionTable used for write operations (like setValue)supportPredicate - a Predicate that checks if a given class is supported by the
ConvertedConfigpublic ConvertedConfig(Config config, java.util.function.Function<java.lang.Object,java.lang.Object> readConversion, java.util.function.Function<java.lang.Object,java.lang.Object> writeConversion, java.util.function.Predicate<java.lang.Class<?>> supportPredicate)
config - the config to wrapreadConversion - the Function used for parse operations (like getValue)writeConversion - the Function used for write operations (like setValue)supportPredicate - a Predicate that checks if a given class is supported by the
ConvertedConfigpublic java.util.Set<? extends Config.Entry> entrySet()
UnmodifiableConfigentrySet in interface ConfigentrySet in interface UnmodifiableConfigentrySet in class ConfigWrapper<Config>public <T> T set(java.util.List<java.lang.String> path,
java.lang.Object value)
Configset in interface Configset in class ConfigWrapper<C extends Config>T - the type of the old valuepath - the value's path, each element of the list is a different part of the path.value - the value to setnullpublic java.util.Map<java.lang.String,java.lang.Object> valueMap()
UnmodifiableConfigvalueMap in interface ConfigvalueMap in interface UnmodifiableConfigvalueMap in class UnmodifiableConfigWrapper<C extends Config>public <T> T getRaw(java.util.List<java.lang.String> path)
UnmodifiableConfigNullObject.NULL_OBJECT to null.getRaw in interface UnmodifiableConfiggetRaw in class UnmodifiableConfigWrapper<C extends Config>T - the value's typepath - the value's path, each element of the list is a different part of the path.null if there is no such value.public ConfigFormat<?> configFormat()
UnmodifiableConfigconfigFormat in interface UnmodifiableConfigconfigFormat in class UnmodifiableConfigWrapper<C extends Config>public java.lang.String toString()
toString in class ConfigWrapper<C extends Config>