Class ConfigurationSectionDataHolder

java.lang.Object
redempt.redlib.config.data.ConfigurationSectionDataHolder
All Implemented Interfaces:
DataHolder

public class ConfigurationSectionDataHolder extends Object implements DataHolder
  • Constructor Details

    • ConfigurationSectionDataHolder

      public ConfigurationSectionDataHolder(org.bukkit.configuration.ConfigurationSection section)
  • Method Details

    • get

      public Object get(String path)
      Description copied from interface: DataHolder
      Gets the object mapped to the given path
      Specified by:
      get in interface DataHolder
      Parameters:
      path - The path
      Returns:
      The object mapped to the path
    • set

      public void set(String path, Object obj)
      Description copied from interface: DataHolder
      Sets the object at a given path
      Specified by:
      set in interface DataHolder
      Parameters:
      path - The path to the object
      obj - The object to set
    • getSubsection

      public DataHolder getSubsection(String path)
      Description copied from interface: DataHolder
      Gets an existing subsection of this DataHolder
      Specified by:
      getSubsection in interface DataHolder
      Parameters:
      path - The path to the data
      Returns:
      The subsection, or null
    • createSubsection

      public DataHolder createSubsection(String path)
      Description copied from interface: DataHolder
      Creates a subsection of this DataHolder
      Specified by:
      createSubsection in interface DataHolder
      Parameters:
      path - The path of the subsection to create
      Returns:
      The created subsection
    • getKeys

      public Set<String> getKeys()
      Specified by:
      getKeys in interface DataHolder
      Returns:
      All valid keys
    • isSet

      public boolean isSet(String path)
      Description copied from interface: DataHolder
      Checks whether a given path has a value associated
      Specified by:
      isSet in interface DataHolder
      Parameters:
      path - The path to check
      Returns:
      Whether the path has an associated value
    • getString

      public String getString(String path)
      Description copied from interface: DataHolder
      Gets a string value from a path
      Specified by:
      getString in interface DataHolder
      Parameters:
      path - The path to the string
      Returns:
      The string
    • getList

      public DataHolder getList(String path)
      Description copied from interface: DataHolder
      Gets a list subsection
      Specified by:
      getList in interface DataHolder
      Parameters:
      path - The path to the subsection
      Returns:
      The list subsection, or null
    • remove

      public void remove(String path)
      Description copied from interface: DataHolder
      Removes a mapping
      Specified by:
      remove in interface DataHolder
      Parameters:
      path - The path of the data to remove
    • unwrap

      public Object unwrap()
      Description copied from interface: DataHolder
      Unwraps the object this DataHolder wraps
      Specified by:
      unwrap in interface DataHolder
      Returns:
      The wrapped storage
    • clearComments

      public void clearComments()
    • getComments

      public Map<String,List<String>> getComments()
    • setComments

      public void setComments(String path, List<String> comments)
      Description copied from interface: DataHolder
      Sets comments on the given path, if it is supported
      Specified by:
      setComments in interface DataHolder
      Parameters:
      path - The path to apply comments to
      comments - The comments to apply