Class EmptyConf

  • All Implemented Interfaces:
    Conf

    public class EmptyConf
    extends Object
    implements Conf
    • Constructor Detail

      • EmptyConf

        public EmptyConf()
    • Method Detail

      • getValue

        public Object getValue​(String path)
        Gets a required parameter value.
        Specified by:
        getValue in interface Conf
        Parameters:
        path - the parameter path.
        Returns:
        the object value.
      • keySet

        public Set<String> keySet()
        Returns a Set view of the keys contained in this conf.
        Specified by:
        keySet in interface Conf
        Returns:
        a set view of the keys contained in this conf
      • getString

        public String getString​(String path)
        Gets a required parameter as a string.
        Specified by:
        getString in interface Conf
        Parameters:
        path - the parameter path.
        Returns:
        the parameter value as a string.
      • getLong

        public long getLong​(String key)
        Gets a required parameter as a long.
        Specified by:
        getLong in interface Conf
        Parameters:
        key - the parameter path.
        Returns:
        the parameter value as a long.
      • getInt

        public int getInt​(String key)
        Gets a required parameter as an integer.
        Specified by:
        getInt in interface Conf
        Parameters:
        key - the parameter path.
        Returns:
        the parameter value as a int.
      • getBoolean

        public boolean getBoolean​(String key)
        Gets a required parameter as an boolean.
        Specified by:
        getBoolean in interface Conf
        Parameters:
        key - the parameter path.
        Returns:
        the parameter value as a boolean.
      • getDouble

        public double getDouble​(String key)
        Gets a required parameter as a double.
        Specified by:
        getDouble in interface Conf
        Parameters:
        key - the parameter path.
        Returns:
        the parameter value as a double.
      • getStringList

        public List<String> getStringList​(String key)
        Gets a required parameter as a list.
        Specified by:
        getStringList in interface Conf
        Parameters:
        key - the parameter path.
        Returns:
        a string list value.
      • getSubConf

        public Conf getSubConf​(String key)
        Gets a required parameter as a Conf.
        Specified by:
        getSubConf in interface Conf
        Parameters:
        key - the parameter path.
        Returns:
        a new Conf instance.
      • getSubConfList

        public List<Conf> getSubConfList​(String key)
        Gets a required parameter as a list of Conf.
        Specified by:
        getSubConfList in interface Conf
        Parameters:
        key - the parameter path.
        Returns:
        a new list of Conf instances.
      • hasPath

        public boolean hasPath​(String key)
        Checks whether the specified path exists into this Conf.
        Specified by:
        hasPath in interface Conf
        Parameters:
        key - the path to be checked.
        Returns:
        true if the path exists, false otherwise.
      • getClasses

        public <T> Collection<T> getClasses​(String key,
                                            Class<T> type)
        Gets a required parameter as a list of instances of type Conf.
        Specified by:
        getClasses in interface Conf
        Type Parameters:
        T - the expected type.
        Parameters:
        key - the parameter path.
        type - the class of the .
        Returns:
        a new Collection of Conf.
      • getClass

        public <T> T getClass​(String key,
                              Class<T> type)
        Gets a required parameter as an instances of type Conf.
        Specified by:
        getClass in interface Conf
        Type Parameters:
        T - the expected type.
        Parameters:
        key - the parameter path.
        type - the class of the .
        Returns:
        a new Collection of Conf.
      • getConfAsMap

        public Map<String,​Object> getConfAsMap()
        Converts this Conf into a path-value map.
        Specified by:
        getConfAsMap in interface Conf
        Returns:
        a new Map instance containing the configuration values.