Interface NamedParams

  • All Known Implementing Classes:
    NamedParamsDefault

    public interface NamedParams
    Interface to implement named parameters.
    Author:
    Sven Boden
    • Method Detail

      • addParameterDefinition

        void addParameterDefinition​(String key,
                                    String defValue,
                                    String description)
                             throws DuplicateParamException
        Add a parameter definition to this set. TODO: default, throw exception
        Parameters:
        key - Name of the parameter.
        defValue - default value.
        description - Description of the parameter.
        Throws:
        DuplicateParamException - Upon duplicate parameter definitions
      • getParameterDescription

        String getParameterDescription​(String key)
                                throws UnknownParamException
        Get the description of a parameter.
        Parameters:
        key - Key to get value for.
        Returns:
        description of parameter key.
        Throws:
        UnknownParamException - Parameter 'key' is unknown.
      • getParameterDefault

        String getParameterDefault​(String key)
                            throws UnknownParamException
        Get the default value of a parameter.
        Parameters:
        key - Key to get value for.
        Returns:
        default value for parameter key.
        Throws:
        UnknownParamException - Parameter 'key' is unknown.
      • listParameters

        String[] listParameters()
        List the parameters.
        Returns:
        Array of parameters.
      • eraseParameters

        void eraseParameters()
        Clear the values.
      • copyParametersFrom

        void copyParametersFrom​(NamedParams params)
        Copy params to these named parameters (clearing out first).
        Parameters:
        params - the parameters to copy from.
      • mergeParametersWith

        default void mergeParametersWith​(NamedParams params,
                                         boolean replace)
        Merge the given named parameters with current ones.
        Parameters:
        params - the parameters to merge with.
        replace - replace if exists
      • activateParameters

        void activateParameters()
        Activate the currently set parameters
      • clearParameters

        void clearParameters()
        Clear all parameters