Class MultiValueMap
java.lang.Object
com.aquima.interactions.foundation.utility.MultiValueMap
- All Implemented Interfaces:
Serializable
Map class for string key/string array value pairs.
- Since:
- 9.0
- Author:
- Arjan Pragt
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionThis method constructs an empty multivalue mapMultiValueMap
(MultiValueMap other) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
This method adds a value for the specified key.boolean
containsKey
(String name) This method may be used to test if the map contains a value (may be null) in this map.String[]
getKeys()
This method returns the keys of the map.String[]
This method returns the values for a specified key.void
This method sets a value in this map for a specified key.int
size()
This method returns the size of the map.toString()
-
Constructor Details
-
MultiValueMap
public MultiValueMap()This method constructs an empty multivalue map -
MultiValueMap
Copy constructor- Parameters:
other
- the map to copy from
-
-
Method Details
-
size
public int size()This method returns the size of the map.- Returns:
- The size of the map.
-
getKeys
This method returns the keys of the map.- Returns:
- The keys of the map, never null, but could be an empty array.
-
containsKey
This method may be used to test if the map contains a value (may be null) in this map.- Parameters:
name
- The name of the key.- Returns:
- Boolean indicating if this map contains a value (may be null) for the specified key.
-
setValue
This method sets a value in this map for a specified key.- Parameters:
name
- The key name, may be null.value
- The value, may be null.
-
addValue
This method adds a value for the specified key.- Parameters:
name
- The key name, may be null.value
- The value to add, may be null.
-
getValues
This method returns the values for a specified key.- Parameters:
name
- The key name, may be null.- Returns:
- The values, may be null or an array containing null values.
-
toString
-