Class ConfigWrapper<C extends Config>

    • Constructor Detail

      • ConfigWrapper

        protected ConfigWrapper​(C config)
    • Method Detail

      • set

        public <T> T set​(java.util.List<java.lang.String> path,
                         java.lang.Object value)
        Description copied from interface: Config
        Sets a config value.
        Specified by:
        set in interface Config
        Type Parameters:
        T - the type of the old value
        Parameters:
        path - the value's path, each element of the list is a different part of the path.
        value - the value to set
        Returns:
        the old value if any, or null
      • add

        public boolean add​(java.util.List<java.lang.String> path,
                           java.lang.Object value)
        Description copied from interface: Config
        Adds a config value. The value is set iff there is no value associated with the given path.
        Specified by:
        add in interface Config
        Parameters:
        path - the value's path, each element of the list is a different part of the path.
        value - the value to set
        Returns:
        true if the value has been added, false if a value is already associated with the given path
      • remove

        public <T> T remove​(java.util.List<java.lang.String> path)
        Description copied from interface: Config
        Removes a value from the config.
        Specified by:
        remove in interface Config
        Type Parameters:
        T - the type of the old value
        Parameters:
        path - the value's path, each element of the list is a different part of the path.
        Returns:
        the old value if any, or null
      • clear

        public void clear()
        Description copied from interface: Config
        Removes all values from the config.
        Specified by:
        clear in interface Config
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object