public final class InMemoryFormat extends java.lang.Object implements ConfigFormat<Config>
isInMemory() returns always true.| Modifier and Type | Method and Description |
|---|---|
Config |
createConfig(java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.Object>> mapCreator)
Creates a config that uses the given map supplier for all its levels (top
level and subconfigs).
|
ConfigParser<Config> |
createParser() |
ConfigWriter |
createWriter() |
static InMemoryFormat |
defaultInstance() |
boolean |
isInMemory()
Checks if this format is in memory only and therefore cannot create writers nor parsers.
|
boolean |
supportsComments()
Checks if this format supports CommentedConfigs.
|
boolean |
supportsType(java.lang.Class<?> type)
Checks if this format supports the given type of value.
|
static InMemoryFormat |
withSupport(java.util.function.Predicate<java.lang.Class<?>> supportPredicate) |
static InMemoryFormat |
withUniversalSupport() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateConcurrentConfig, createConfig, initEmptyFile, initEmptyFile, initEmptyFilepublic static InMemoryFormat defaultInstance()
public static InMemoryFormat withSupport(java.util.function.Predicate<java.lang.Class<?>> supportPredicate)
public static InMemoryFormat withUniversalSupport()
public ConfigWriter createWriter()
createWriter in interface ConfigFormat<Config>public ConfigParser<Config> createParser()
createParser in interface ConfigFormat<Config>public Config createConfig(java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.Object>> mapCreator)
ConfigFormatcreateConfig in interface ConfigFormat<Config>mapCreator - the map supplier for the configpublic boolean supportsComments()
ConfigFormatsupportsComments in interface ConfigFormat<Config>true iff this format supports CommentedConfigspublic boolean supportsType(java.lang.Class<?> type)
ConfigFormatsupportsType in interface ConfigFormat<Config>type - the type to check, may be null in which case this method checks if the format
supports null valuestrue iff this format supports the given typepublic boolean isInMemory()
ConfigFormatisInMemory in interface ConfigFormat<Config>true iff this format is only in memory.