Class ParameterMap

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​java.lang.String[]>

    public class ParameterMap
    extends java.util.LinkedHashMap<java.lang.String,​java.lang.String[]>
    The Class ParameterMap.

    Created: 2008. 06. 11 PM 8:55:13

    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      ParameterMap()
      Instantiates a new ParameterMap.
      ParameterMap​(int initialCapacity)
      Instantiates a new ParameterMap.
      ParameterMap​(java.util.Map<java.lang.String,​java.lang.String[]> params)
      Instantiates a new ParameterMap.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> extractAsMap()  
      java.util.Map<java.lang.String,​java.lang.Object> extractAsMap​(java.util.Map<java.lang.String,​java.lang.Object> targetMap)  
      java.lang.String getParameter​(java.lang.String name)
      Returns the string value to which the specified name is mapped, or null if this map contains no mapping for the name.
      java.util.Set<java.lang.String> getParameterNames()
      Returns a Collection of String objects containing the names of the parameters.
      java.lang.String[] getParameterValues​(java.lang.String name)
      Returns the string values to which the specified name is mapped, or null if this map contains no mapping for the name.
      void setAll​(java.util.Map<java.lang.String,​java.lang.String> params)
      Set the given parameters under.
      void setParameter​(java.lang.String name, java.lang.String value)
      Sets the value to the parameter with the given name.
      void setParameterValues​(java.lang.String name, java.lang.String[] values)
      Sets the values to the parameter with the given name.
      • Methods inherited from class java.util.LinkedHashMap

        clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
      • Methods inherited from class java.util.HashMap

        clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
    • Constructor Detail

      • ParameterMap

        public ParameterMap()
        Instantiates a new ParameterMap.
      • ParameterMap

        public ParameterMap​(int initialCapacity)
        Instantiates a new ParameterMap.
        Parameters:
        initialCapacity - the initial capacity
      • ParameterMap

        public ParameterMap​(java.util.Map<java.lang.String,​java.lang.String[]> params)
        Instantiates a new ParameterMap.
        Parameters:
        params - the other parameter map
    • Method Detail

      • getParameter

        public java.lang.String getParameter​(java.lang.String name)
        Returns the string value to which the specified name is mapped, or null if this map contains no mapping for the name.
        Parameters:
        name - the parameter name
        Returns:
        a String representing the single value of the parameter
      • getParameterValues

        public java.lang.String[] getParameterValues​(java.lang.String name)
        Returns the string values to which the specified name is mapped, or null if this map contains no mapping for the name.
        Parameters:
        name - the parameter name
        Returns:
        an array of String objects containing the parameter's values
      • setParameter

        public void setParameter​(java.lang.String name,
                                 java.lang.String value)
        Sets the value to the parameter with the given name.
        Parameters:
        name - a String specifying the name of the parameter
        value - a String representing the single value of the parameter
        See Also:
        setParameterValues(String, String[])
      • setParameterValues

        public void setParameterValues​(java.lang.String name,
                                       java.lang.String[] values)
        Sets the values to the parameter with the given name.
        Parameters:
        name - a String specifying the name of the parameter
        values - an array of String objects containing the parameter's values
        See Also:
        setParameter(java.lang.String, java.lang.String)
      • getParameterNames

        public java.util.Set<java.lang.String> getParameterNames()
        Returns a Collection of String objects containing the names of the parameters. If no parameters, the method returns an empty Collection.
        Returns:
        a Collection of String objects, each String containing the name of a parameter; or an empty Collection if no parameters
      • setAll

        public void setAll​(java.util.Map<java.lang.String,​java.lang.String> params)
        Set the given parameters under.
        Parameters:
        params - the other parameter map
      • extractAsMap

        public java.util.Map<java.lang.String,​java.lang.Object> extractAsMap()
      • extractAsMap

        public java.util.Map<java.lang.String,​java.lang.Object> extractAsMap​(java.util.Map<java.lang.String,​java.lang.Object> targetMap)