Class InMemoryFormat

    • Method Detail

      • withSupport

        public static InMemoryFormat withSupport​(java.util.function.Predicate<java.lang.Class<?>> supportPredicate)
      • withUniversalSupport

        public static InMemoryFormat withUniversalSupport()
      • createConfig

        public Config createConfig​(java.util.function.Supplier<java.util.Map<java.lang.String,​java.lang.Object>> mapCreator)
        Description copied from interface: ConfigFormat
        Creates a config that uses the given map supplier for all its levels (top level and subconfigs).
        Specified by:
        createConfig in interface ConfigFormat<Config>
        Parameters:
        mapCreator - the map supplier for the config
        Returns:
        a config of this format with the given map creator
      • supportsComments

        public boolean supportsComments()
        Description copied from interface: ConfigFormat
        Checks if this format supports CommentedConfigs. Note that supporting CommentedConfigs isn't the same things as allowing the user to write comments in the config files.
        Specified by:
        supportsComments in interface ConfigFormat<Config>
        Returns:
        true iff this format supports CommentedConfigs
      • supportsType

        public boolean supportsType​(java.lang.Class<?> type)
        Description copied from interface: ConfigFormat
        Checks if this format supports the given type of value.
        Specified by:
        supportsType in interface ConfigFormat<Config>
        Parameters:
        type - the type to check, may be null in which case this method checks if the format supports null values
        Returns:
        true iff this format supports the given type
      • isInMemory

        public boolean isInMemory()
        Description copied from interface: ConfigFormat
        Checks if this format is in memory only and therefore cannot create writers nor parsers.
        Specified by:
        isInMemory in interface ConfigFormat<Config>
        Returns:
        true iff this format is only in memory.