Class ConfigWrapper<C extends Config>
java.lang.Object
com.electronwill.nightconfig.core.utils.UnmodifiableConfigWrapper<C>
com.electronwill.nightconfig.core.utils.ConfigWrapper<C>
- All Implemented Interfaces:
Config,UnmodifiableConfig
- Direct Known Subclasses:
CommentedConfigWrapper,ConvertedCommentedConfig,ConvertedCommentedFileConfig,ConvertedConfig,ConvertedFileConfig,FakeCommentedConfig
public abstract class ConfigWrapper<C extends Config>
extends UnmodifiableConfigWrapper<C>
implements Config
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.electronwill.nightconfig.core.Config
Config.EntryNested classes/interfaces inherited from interface com.electronwill.nightconfig.core.UnmodifiableConfig
UnmodifiableConfig.Entry -
Field Summary
Fields inherited from class com.electronwill.nightconfig.core.utils.UnmodifiableConfigWrapper
config -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds a config value.voidclear()Removes all values from the config.Creates a new sub config of this config, as created when a subconfig's creation is implied byConfig.set(List, Object)orConfig.add(List, Object).Set<? extends Config.Entry>entrySet()Returns a Set view of the config's entries.<T> TRemoves a value from the config.<T> TSets a config value.toString()Methods inherited from class com.electronwill.nightconfig.core.utils.UnmodifiableConfigWrapper
configFormat, contains, equals, getRaw, hashCode, isEmpty, size, valueMapMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.electronwill.nightconfig.core.Config
add, addAll, checked, putAll, remove, removeAll, set, unmodifiable, update, update, valueMapMethods inherited from interface com.electronwill.nightconfig.core.UnmodifiableConfig
apply, apply, configFormat, 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, getRaw, getShort, getShort, getShortOrElse, getShortOrElse, isEmpty, isNull, isNull, size
-
Constructor Details
-
ConfigWrapper
-
-
Method Details
-
entrySet
Description copied from interface:UnmodifiableConfigReturns a Set view of the config's entries. If the config is unmodifiable then the returned set is unmodifiable too.- Specified by:
entrySetin interfaceConfig- Specified by:
entrySetin interfaceUnmodifiableConfig- Overrides:
entrySetin classUnmodifiableConfigWrapper<C extends Config>- Returns:
- a Set view of the config's entries.
-
set
Description copied from interface:ConfigSets a config value. -
add
Description copied from interface:ConfigAdds a config value. The value is set iff there is no value associated with the given path. -
remove
Description copied from interface:ConfigRemoves a value from the config. -
clear
public void clear()Description copied from interface:ConfigRemoves all values from the config. -
createSubConfig
Description copied from interface:ConfigCreates a new sub config of this config, as created when a subconfig's creation is implied byConfig.set(List, Object)orConfig.add(List, Object).- Specified by:
createSubConfigin interfaceConfig- Returns:
- a new sub config
-
toString
-