Class ParameterList

    • Constructor Detail

      • ParameterList

        public ParameterList()
        Default constructor. Creates a modifiable parameter list.
      • ParameterList

        public ParameterList​(boolean unmodifiable)
        Constructor.
        Parameters:
        unmodifiable - indicates whether the list should be mutable
      • ParameterList

        public ParameterList​(ParameterList list,
                             boolean unmodifiable)
        Creates a deep copy of the specified parameter list. That is, copies of all parameters in the specified list are added to this list.
        Parameters:
        list - a parameter list to copy parameters from
        unmodifiable - indicates whether the list should be mutable
        Throws:
        URISyntaxException - where a parameter in the list specifies an invalid URI value
    • Method Detail

      • getParameter

        public final <T extends Parameter> T getParameter​(String aName)
        Returns the first parameter with the specified name.
        Parameters:
        aName - name of the parameter
        Returns:
        the first matching parameter or null if no matching parameters
      • getParameters

        public final ParameterList getParameters​(String name)
        Returns a list of parameters with the specified name.
        Parameters:
        name - name of parameters to return
        Returns:
        a parameter list
      • add

        public final boolean add​(Parameter parameter)
        Add a parameter to the list. Note that this method will not remove existing parameters of the same type. To achieve this use {
      • replace

        public final boolean replace​(Parameter parameter)
        Replace any parameters of the same type with the one specified.
        Parameters:
        parameter - parameter to add to this list in place of all others with the same name
        Returns:
        true if successfully added to this list
      • isEmpty

        public final boolean isEmpty()
        Returns:
        boolean indicates if the list is empty
        See Also:
        List.isEmpty()
      • contains

        public boolean contains​(Parameter parameter)
        Returns true if this parameter list includes the specified parameter.
        Parameters:
        parameter - a parameter specification
        Returns:
        true if parameter matching specification is found
      • remove

        public final boolean remove​(Parameter parameter)
        Remove a parameter from the list.
        Parameters:
        parameter - the parameter to remove
        Returns:
        true if the list contained the specified parameter
        See Also:
        List.remove(java.lang.Object)
      • removeAll

        public final void removeAll​(String paramName)
        Remove all parameters with the specified name.
        Parameters:
        paramName - the name of parameters to remove
      • size

        public final int size()
        Returns:
        the number of parameters in the list
        See Also:
        List.size()
      • equals

        public final boolean equals​(Object arg0)
        Overrides:
        equals in class Object
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object