Class YAMLSection

java.lang.Object
net.ME1312.Galaxi.Library.Map.ObjectMap<String>
net.ME1312.Galaxi.Library.Config.YAMLSection

public class YAMLSection extends ObjectMap<String>
YAML Config Section Class
  • Constructor Details

    • YAMLSection

      public YAMLSection()
      Creates an empty YAML Section
    • YAMLSection

      public YAMLSection(InputStream stream) throws org.yaml.snakeyaml.error.YAMLException
      Creates a YAML Section from an Input Stream
      Parameters:
      stream - Input Stream
      Throws:
      org.yaml.snakeyaml.error.YAMLException
    • YAMLSection

      public YAMLSection(Reader reader) throws org.yaml.snakeyaml.error.YAMLException
      Creates a YAML Section from a Reader
      Parameters:
      reader - Reader
      Throws:
      org.yaml.snakeyaml.error.YAMLException
    • YAMLSection

      public YAMLSection(String str) throws org.yaml.snakeyaml.error.YAMLException
      Creates a YAML Section from a String
      Parameters:
      str - String
      Throws:
      org.yaml.snakeyaml.error.YAMLException
    • YAMLSection

      public YAMLSection(Map<? extends String,?> map)
      Creates a YAML Section from Map Contents
      Parameters:
      map - Map
    • YAMLSection

      public YAMLSection(ObjectMap<String> map)
      Creates a YAML Section from Map Contents
      Parameters:
      map - Map
    • YAMLSection

      public YAMLSection(org.json.JSONObject json)
      Creates a YAML Section from JSON Contents
      Parameters:
      json - JSON
  • Method Details

    • clone

      public YAMLSection clone()
      Description copied from class: ObjectMap
      Clone this Map
      Overrides:
      clone in class ObjectMap<String>
      Returns:
      Map Clone
    • getSection

      public YAMLSection getSection(String handle)
      Get a YAML Section by Handle
      Parameters:
      handle - Handle
      Returns:
      Object Map
    • getSection

      public YAMLSection getSection(String handle, Map<? extends String,?> def)
      Get a YAML Section by Handle
      Parameters:
      handle - Handle
      def - Default
      Returns:
      Object Map
    • getSection

      public YAMLSection getSection(String handle, YAMLSection def)
      Get a YAML Section by Handle
      Parameters:
      handle - Handle
      def - Default
      Returns:
      Object Map
    • getSection

      public YAMLSection getSection(String handle, Supplier<? extends YAMLSection> def)
      Get a YAML Section by Handle
      Parameters:
      handle - Handle
      def - Default
      Returns:
      Object Map
    • getSectionList

      public List<YAMLSection> getSectionList(String handle)
      Get a YAML Section List by Handle
      Parameters:
      handle - Handle
      Returns:
      Object Map List
    • getSectionList

      public List<YAMLSection> getSectionList(String handle, Collection<? extends Map<? extends String,?>> def)
      Get a YAML Section List by Handle
      Parameters:
      handle - Handle
      def - Default
      Returns:
      Object Map List
    • getSectionList

      public List<YAMLSection> getSectionList(String handle, List<? extends YAMLSection> def)
      Get a YAML Section List by Handle
      Parameters:
      handle - Handle
      def - Default
      Returns:
      Object Map List
    • getSectionList

      public List<YAMLSection> getSectionList(String handle, Supplier<? extends List<? extends YAMLSection>> def)
      Get a YAML Section List by Handle
      Parameters:
      handle - Handle
      def - Default
      Returns:
      Object Map List
    • toString

      public String toString()
      Overrides:
      toString in class ObjectMap<String>
    • toJSON

      public org.json.JSONObject toJSON()
      Convert to JSON
      Returns:
      JSON