Class ParametersStateString

    • Constructor Detail

      • ParametersStateString

        protected ParametersStateString​(String opaqueValue)
      • ParametersStateString

        protected ParametersStateString()
        Creates an empty parameter set.
    • Method Detail

      • create

        public static ParametersStateString create​(StateString stateString)
                                            throws IllegalArgumentException
        Create a parameters state string. It assumes that the argument is either an instance of ParametersStateString or that it is the string encoded value of a ParametersStateString.
        Parameters:
        stateString - the state string
        Returns:
        a new parameter state string
        Throws:
        IllegalArgumentException - if the state string is opaque and does not represent parameters
      • clear

        public void clear()
        Clear all the parameters.
      • setValue

        public void setValue​(String name,
                             String value)
        Set the a parameter value.
        Parameters:
        name - the parameter name
        value - the parameter value
        Throws:
        IllegalArgumentException - if the name or the value is null
      • setValues

        public void setValues​(String name,
                              String[] values)
        Set the parameter values. This method does not make a defensive copy of the values.
        Parameters:
        name - the parameter name
        values - the parameter values
        Throws:
        IllegalArgumentException - if the name is null
      • remove

        public void remove​(String name)
        Remove a parameter.
        Parameters:
        name - the parameter name
        Throws:
        IllegalArgumentException - if the name is null
      • getSize

        public int getSize()
        Return the size.
        Returns:
        the size
      • getParameters

        public Map<String,​String[]> getParameters()
        Return the underlying parameter object.
        Returns:
        the parameter object
      • getStringValue

        public String getStringValue()
        Retrieves the opaque version associated with this navigational state.
        Specified by:
        getStringValue in class StateString
        Returns:
        a URL-safe String representation of this navigational state.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object