Interface SectionMappable<C extends Collection<org.bukkit.configuration.ConfigurationSection>,S extends SectionMappable<C,S>>

Type Parameters:
C - the type of collection that holds ConfigurationSection elements
S - the type of the implementing SectionMappable instance
All Superinterfaces:
BaseBuilder<S>, Copyable<S>, Iterable<Map.Entry<Integer,C>>, Map<Integer,C>, Mappable<org.bukkit.configuration.ConfigurationSection,C,S>
All Known Subinterfaces:
SectionMappable.List, SectionMappable.Set

public interface SectionMappable<C extends Collection<org.bukkit.configuration.ConfigurationSection>,S extends SectionMappable<C,S>> extends Mappable<org.bukkit.configuration.ConfigurationSection,C,S>
Represents a specialized Mappable for mapping integer keys to collections of ConfigurationSection objects.

SectionMappable provides a framework for organizing configuration sections by numeric keys, along with utility methods to convert the stored values into more specific data structures such as sets or lists. It is designed to be implemented by a concrete class to ensure full functionality, such as correctly handling storage and retrieval of configuration sections.

Note: While the base SectionMappable interface must be implemented for full functionality, its nested sub-interfaces SectionMappable.Set and SectionMappable.List do not require separate implementations. They can be directly instantiated using the provided static factory methods asSet(Map) and asList(Map), which return ready-to-use instances.

  • Method Details

    • asSet

      static SectionMappable.Set asSet(Map<Integer,Set<org.bukkit.configuration.ConfigurationSection>> map)
      Creates a SectionMappable.Set instance from the given map.
      Parameters:
      map - a map with integer keys and sets of ConfigurationSection as values
      Returns:
      a new instance of SectionMappable.Set populated with the given map
    • asSet

      static SectionMappable.Set asSet()
      Creates an empty SectionMappable.Set instance.
      Returns:
      a new empty instance of SectionMappable.Set
    • asList

      static SectionMappable.List asList(Map<Integer,List<org.bukkit.configuration.ConfigurationSection>> map)
      Creates a SectionMappable.List instance from the given map.
      Parameters:
      map - a map with integer keys and lists of ConfigurationSection as values
      Returns:
      a new instance of SectionMappable.List populated with the given map
    • asList

      static SectionMappable.List asList()
      Creates an empty SectionMappable.List instance.
      Returns:
      a new empty instance of SectionMappable.List