Class YamlMap

    • Method Detail

      • from

        public static YamlMap from​(Object... pairs)
        Quick inline map creation.
        Parameters:
        pairs - Key value pairs
        Returns:
        Map of provided key value pairs.
      • str

        public String str​(String key)
        String access.
        Returns:
        String access, converting if necessary.
      • strOr

        public String strOr​(String key,
                            String def)
        String access.
        Parameters:
        def - default if value not provided
        Returns:
        String access, converting if necessary.
      • integer

        public Integer integer​(String key)
        Integer access.
        Returns:
        Integer access, converting if necessary.
      • intOr

        public Integer intOr​(String key,
                             Integer def)
        Integer access.
        Parameters:
        def - default if value not provided
        Returns:
        Integer access, converting if necessary.
      • doub

        public Double doub​(String key)
        Double access.
        Returns:
        Integer access, converting if necessary.
      • doubOr

        public Double doubOr​(String key,
                             Double def)
        Double access.
        Parameters:
        def - default if value not provided
        Returns:
        Integer access, converting if necessary.
      • bool

        public Boolean bool​(String key)
        Boolean access.
        Returns:
        Boolean access, converting if necessary.
      • boolOr

        public Boolean boolOr​(String key,
                              Boolean def)
        Boolean access.
        Parameters:
        def - default if value not provided
        Returns:
        Boolean access, converting if necessary.
      • has

        public boolean has​(String key)
        Check if mapping available for key
        Returns:
        true if mapping available for key
      • get

        public Object get​(String key)
        Value access
        Returns:
        Value access
      • obj

        public YamlObject<?> obj​(String key)
        Access value as a Yaml wrapper.

        Wrappers are provided for Map and List

        Returns:
        Access as Yaml wrapper
      • map

        public YamlMap map​(String key)
        Access value as a YamlMap
        Returns:
        Access as YamlMap
      • seq

        public YamlSeq seq​(String key)
        Access value as a YamlSeq
        Returns:
        Access as YamlSeq
      • key

        public String key​(int i)
        Access key by index, order provided by iterator().
        Parameters:
        i - index
        Returns:
        key access by index