org.springframework.mock.web
Class HeaderValueHolder

java.lang.Object
  extended by 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
           
 
Constructor Summary
HeaderValueHolder()
           
 
Method Summary
 void addValue(java.lang.Object value)
           
 void addValueArray(java.lang.Object values)
           
 void addValues(java.util.Collection<?> values)
           
static HeaderValueHolder getByName(java.util.Map<java.lang.String,HeaderValueHolder> headers, java.lang.String name)
          Find a HeaderValueHolder by name, ignoring casing.
 java.lang.String getStringValue()
           
 java.util.List<java.lang.String> getStringValues()
           
 java.lang.Object getValue()
           
 java.util.List<java.lang.Object> getValues()
           
 void setValue(java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

values

private final java.util.List<java.lang.Object> values
Constructor Detail

HeaderValueHolder

HeaderValueHolder()
Method Detail

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 HeaderValueHolders
name - the name of the desired header
Returns:
the corresponding HeaderValueHolder, or null if none found