Class YamlConfiguration

    • Constructor Detail

      • YamlConfiguration

        public YamlConfiguration​(@Nullable
                                 Map<String,​Object> values)
        Initialize the YamlConfiguration with existed key-value pairs or not
        Parameters:
        values - the YAML configuration key-value pairs
    • Method Detail

      • set

        public void set​(String key,
                        Object value)
        Description copied from interface: SectionMap
        Store the key-value pair
        Specified by:
        set in interface SectionMap
        Parameters:
        key - the key of the key-value pair
        value - the value of the key-value pair
      • get

        public <T> T get​(String key)
        Description copied from interface: SectionMap
        Get the value of the key-value pair
        Specified by:
        get in interface SectionMap
        Type Parameters:
        T - the desired type
        Parameters:
        key - the key of the key-value pair
        Returns:
        the desired value
      • save

        public void save​(File file)
        Save the YAML configuration as a file
        Parameters:
        file - where to save