Interface SectionMap

    • Method Detail

      • set

        default void set​(String key,
                         Object value)
        Store the key-value pair
        Parameters:
        key - the key of the key-value pair
        value - the value of the key-value pair
      • get

        default <T> T get​(String key)
        Get the value of the key-value pair
        Type Parameters:
        T - the desired type
        Parameters:
        key - the key of the key-value pair
        Returns:
        the desired value
        Throws:
        ClassCastException - if the desired T type is not equal to its original type
      • contains

        default boolean contains​(String key)
        Indicate there is a key-value pair named key
        Parameters:
        key - the key of the key-value pair
        Returns:
        true there is a key-value pair named key, false otherwise
      • remove

        default void remove​(String key)
        Remove the key-value pair named key
        Parameters:
        key - the key of the key-value pair
      • createSection

        SectionMap createSection​(String key)
        Create the section named key
        Parameters:
        key - the key of the Section
        Returns:
        a section named key
      • getValues

        Map<String,​Object> getValues()
        Get all the key-value pairs
        Returns:
        all the key-value pairs
      • keys

        default Set<String> keys()
        Get all the keys in set
        Returns:
        all the keys in set
      • getOrDefault

        default <T> T getOrDefault​(String key,
                                   T defaultValue)