org.springframework.mock.web
Class HeaderValueHolder
java.lang.Object
org.springframework.mock.web.HeaderValueHolder
class HeaderValueHolder
- extends java.lang.Object
Internal helper class that serves as value holder for request headers.
- Since:
- 2.0.1
- Author:
- Juergen Hoeller, Rick Evans
Field Summary |
private java.util.List<java.lang.Object> |
values
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
values
private final java.util.List<java.lang.Object> values
HeaderValueHolder
HeaderValueHolder()
setValue
public void setValue(java.lang.Object value)
addValue
public void addValue(java.lang.Object value)
addValues
public void addValues(java.util.Collection<?> values)
addValueArray
public void addValueArray(java.lang.Object values)
getValues
public java.util.List<java.lang.Object> getValues()
getStringValues
public java.util.List<java.lang.String> getStringValues()
getValue
public java.lang.Object getValue()
getStringValue
public java.lang.String getStringValue()
getByName
public static HeaderValueHolder getByName(java.util.Map<java.lang.String,HeaderValueHolder> headers,
java.lang.String name)
- Find a HeaderValueHolder by name, ignoring casing.
- Parameters:
headers
- the Map of header names to HeaderValueHoldersname
- the name of the desired header
- Returns:
- the corresponding HeaderValueHolder,
or
null
if none found