Package org.springframework.http.support

# Class Netty4HeadersAdapter

java.lang.Object
org.springframework.http.support.Netty4HeadersAdapter

All Implemented Interfaces:
  `Map<String,List<String>>`, `org.springframework.util.MultiValueMap<String,String>`

public final class Netty4HeadersAdapter extends Object implements org.springframework.util.MultiValueMap<String,String>
`MultiValueMap` implementation for wrapping Netty 4 HTTP headers.

Since:
  6.1
Author:
  Rossen Stoyanchev, Sam Brannen, Simon Baslé

## Nested Class Summary

## Nested classes/interfaces inherited from interface java.util.Map

`Map.Entry<K extends Object,V extends Object>`

## Constructor Summary

Constructors
Constructor
Description
`Netty4HeadersAdapter(io.netty.handler.codec.http.HttpHeaders headers)`
Creates a new `Netty4HeadersAdapter` based on the given `HttpHeaders`.

## Method Summary

Modifier and Type
Method
Description
`void`
`add(String key, String value)`
`void`
`addAll(String key, List<? extends String> values)`
`void`
`addAll(org.springframework.util.MultiValueMap<String,String> values)`
`void`
`clear()`
`boolean`
`containsKey(Object key)`
`boolean`
`containsValue(Object value)`
`Set<Map.Entry<String,List<String>>>`
`entrySet()`
`List<String>`
`get(Object key)`
`String`
`getFirst(String key)`
`boolean`
`isEmpty()`
`Set<String>`
`keySet()`
`List<String>`
`put(String key, List<String> value)`
`void`
`putAll(Map<? extends String,? extends List<String>> map)`
`List<String>`
`remove(Object key)`
`void`
`set(String key, String value)`
`void`
`setAll(Map<String,String> values)`
`int`
`size()`
`Map<String,String>`
`toSingleValueMap()`
`String`
`toString()`
`Collection<List<String>>`
`values()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.util.Map

`compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll`

### Methods inherited from interface org.springframework.util.MultiValueMap

`addIfAbsent, asSingleValueMap`

## Constructor Details

### Netty4HeadersAdapter

public Netty4HeadersAdapter(io.netty.handler.codec.http.HttpHeaders headers)
Creates a new `Netty4HeadersAdapter` based on the given `HttpHeaders`.

## Method Details

### getFirst

@Nullable public String getFirst(String key)

Specified by:
  `getFirst` in interface `org.springframework.util.MultiValueMap<String,String>`

### add

public void add(String key, @Nullable String value)

Specified by:
  `add` in interface `org.springframework.util.MultiValueMap<String,String>`

### addAll

public void addAll(String key, List<? extends String> values)

Specified by:
  `addAll` in interface `org.springframework.util.MultiValueMap<String,String>`

### addAll

public void addAll(org.springframework.util.MultiValueMap<String,String> values)

Specified by:
  `addAll` in interface `org.springframework.util.MultiValueMap<String,String>`

### set

public void set(String key, @Nullable String value)

Specified by:
  `set` in interface `org.springframework.util.MultiValueMap<String,String>`

### setAll

public void setAll(Map<String,String> values)

Specified by:
  `setAll` in interface `org.springframework.util.MultiValueMap<String,String>`

### toSingleValueMap

public Map<String,String> toSingleValueMap()

Specified by:
  `toSingleValueMap` in interface `org.springframework.util.MultiValueMap<String,String>`

### size

public int size()

Specified by:
  `size` in interface `Map<String,List<String>>`

### isEmpty

public boolean isEmpty()

Specified by:
  `isEmpty` in interface `Map<String,List<String>>`

### containsKey

public boolean containsKey(Object key)

Specified by:
  `containsKey` in interface `Map<String,List<String>>`

### containsValue

public boolean containsValue(Object value)

Specified by:
  `containsValue` in interface `Map<String,List<String>>`

### get

@Nullable public List<String> get(Object key)

Specified by:
  `get` in interface `Map<String,List<String>>`

### put

@Nullable public List<String> put(String key, @Nullable List<String> value)

Specified by:
  `put` in interface `Map<String,List<String>>`

### remove

@Nullable public List<String> remove(Object key)

Specified by:
  `remove` in interface `Map<String,List<String>>`

### putAll

public void putAll(Map<? extends String,? extends List<String>> map)

Specified by:
  `putAll` in interface `Map<String,List<String>>`

### clear

public void clear()

Specified by:
  `clear` in interface `Map<String,List<String>>`

### keySet

public Set<String> keySet()

Specified by:
  `keySet` in interface `Map<String,List<String>>`

### values

public Collection<List<String>> values()

Specified by:
  `values` in interface `Map<String,List<String>>`

### entrySet

public Set<Map.Entry<String,List<String>>> entrySet()

Specified by:
  `entrySet` in interface `Map<String,List<String>>`

### toString

public String toString()

Overrides:
  `toString` in class `Object`