Interface IParameters

    • Method Detail

      • getParameter

        java.lang.Object getParameter​(java.lang.String name)
      • containsParameter

        boolean containsParameter​(java.lang.String name)
        Returns whether a parameter is set in this parameters.

        This is useful to differ a null value parameter from a non-existing parameter.

        Parameters:
        name - the parameter name.
        Returns:
        true if the parameter is set, false otherwise.
        Since:
        10.4.0
      • emptyParameters

        static IParameters emptyParameters()
        Returns a IParameters object that does not contain any parameter.
        Returns:
        an empty IParameters object.
        Since:
        10.4.0
      • asParameters

        static IParameters asParameters​(java.lang.Object obj)
        Returns a IParameters adapter for the given object.
        Parameters:
        obj - the object to adapt as parameters. It may be:
        • null, in this case emptyParameters() is returned.
        • IParameters, in this case obj is returned.
        • Map with String keys. Each map entry will correspond to a parameter where the entry key is the parameter name and the entry value is the parameter value.
        • Otherwise it is assumed to be a Java Bean and the parameters are read from its properties.
        Returns:
        a parameters object according to the given object.
        Since:
        10.4.0
      • removeParameter

        static IParameters removeParameter​(IParameters parameters,
                                           java.lang.String fieldId)
        Returns a IParameters removing the parameter with the given id.
        Parameters:
        parameters - the parameters
        fieldId - the parameter id
        Returns:
        the new parameters
        Since:
        17.0.0
      • setParameter

        static IParameters setParameter​(IParameters parameters,
                                        java.lang.String fieldId,
                                        java.lang.Object newValue)
        Returns a IParameters setting the parameter with the given id. It's important to notice, though, that passing null value will not remove the parameter. Instead, it will set the parameter value to be null but containsParameter(String) will return true. To remove the parameter, use removeParameter(IParameters, String) instead.
        Parameters:
        parameters - the parameters
        fieldId - the parameter id
        newValue - the new value
        Returns:
        the new parameters
        Since:
        17.0.0