Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.util
Interface MultiValueMap<K,V>

All Superinterfaces:
  java.util.Map<K,java.util.List<V>>

All Known Implementing Classes:
  HttpHeaders, LinkedMultiValueMap

    public interface MultiValueMap<K,V>

extends java.util.Map<K,java.util.List<V>>

Extension of the `Map` interface that stores multiple values.

Since:
  3.0
Author:
  Arjen Poutsma

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`java.util.Map.Entry<K,V>`

Method Summary
`void` | `add(K key, V value)` Add the given single value to the current list of values for the given key.
`V` | `getFirst(K key)` Return the first value for the given key.
`void` | `set(K key, V value)` Set the given single value under the given key.
`void` | `setAll(java.util.Map<K,V> values)` Set the given values under.
`java.util.Map<K,V>` | `toSingleValueMap()` Returns the first values contained in this `MultiValueMap`.

Methods inherited from interface java.util.Map
`clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values`

Method Detail

### getFirst

    V getFirst(K key)

  Return the first value for the given key.

  Parameters:
    `key` - the key
  Returns:
    the first value for the specified key, or `null`

### add

    void add(K key,
             V value)

  Add the given single value to the current list of values for the given key.

  Parameters:
    `key` - the key
    `value` - the value to be added

### set

    void set(K key,
             V value)

  Set the given single value under the given key.

  Parameters:
    `key` - the key
    `value` - the value to set

### setAll

    void setAll(java.util.Map<K,V> values)

  Set the given values under.

  Parameters:
    `values` - the values.

### toSingleValueMap

    java.util.Map<K,V> toSingleValueMap()

  Returns the first values contained in this `MultiValueMap`.

  Returns:
    a single value representation of this map

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD