public class InMemoryCommentedFormat extends java.lang.Object implements ConfigFormat<CommentedConfig>
InMemoryFormat| Modifier and Type | Method and Description |
|---|---|
CommentedConfig |
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<CommentedConfig> |
createParser() |
ConfigWriter |
createWriter() |
static InMemoryCommentedFormat |
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 InMemoryCommentedFormat |
withSupport(java.util.function.Predicate<java.lang.Class<?>> supportPredicate) |
static InMemoryCommentedFormat |
withUniversalSupport() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateConcurrentConfig, createConfig, initEmptyFile, initEmptyFile, initEmptyFilepublic static InMemoryCommentedFormat defaultInstance()
public static InMemoryCommentedFormat withSupport(java.util.function.Predicate<java.lang.Class<?>> supportPredicate)
public static InMemoryCommentedFormat withUniversalSupport()
public ConfigWriter createWriter()
createWriter in interface ConfigFormat<CommentedConfig>public ConfigParser<CommentedConfig> createParser()
createParser in interface ConfigFormat<CommentedConfig>public CommentedConfig createConfig(java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.Object>> mapCreator)
ConfigFormatcreateConfig in interface ConfigFormat<CommentedConfig>mapCreator - the map supplier for the configpublic boolean supportsComments()
ConfigFormatsupportsComments in interface ConfigFormat<CommentedConfig>true iff this format supports CommentedConfigspublic boolean supportsType(java.lang.Class<?> type)
ConfigFormatsupportsType in interface ConfigFormat<CommentedConfig>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<CommentedConfig>true iff this format is only in memory.