@SuppressWarnings("unchecked")
    void setHeaderCaseInsensitive(final String name, final String value) {
    """
	Removes all occurrences of the given header in this stub response (using a case insensitive search)
	and sets its single value.
	@param name header name
	@param value header value
    """
        final MultiMap result = new MultiValueMap();
        
        for (final Object o: this.headers.keySet()) {
            final String key = (String) o; //fucking non-generics MultiMap
            if (!name.equalsIgnoreCase(key)) {
                  //copy all other headers to the result multimap
                for(final String s: (Collection<String>)this.headers.get(o)) {
                    result.put(o, s);
                }
            }
        }
        
        this.headers.clear();
        this.headers.putAll(result);
        this.addHeader(name, value);
    }
@SuppressWarnings("unchecked")
    void setHeaderCaseInsensitive(final String name, final String value) {
        final MultiMap result = new MultiValueMap();
        
        for (final Object o: this.headers.keySet()) {
            final String key = (String) o; //fucking non-generics MultiMap
            if (!name.equalsIgnoreCase(key)) {
                  //copy all other headers to the result multimap
                for(final String s: (Collection<String>)this.headers.get(o)) {
                    result.put(o, s);
                }
            }
        }
        
        this.headers.clear();
        this.headers.putAll(result);
        this.addHeader(name, value);
    }
@ SuppressWarnings ( "unchecked" ) void setHeaderCaseInsensitive ( final String name , final String value ) { final MultiMap result = new MultiValueMap ( ) ; for ( final Object o : this . headers . keySet ( ) ) { final String key = ( String ) o ; //fucking non-generics MultiMap if ( ! name . equalsIgnoreCase ( key ) ) { //copy all other headers to the result multimap for ( final String s : ( Collection < String > ) this . headers . get ( o ) ) { result . put ( o , s ) ; } } } this . headers . clear ( ) ; this . headers . putAll ( result ) ; this . addHeader ( name , value ) ; }
Removes all occurrences of the given header in this stub response (using a case insensitive search)
and sets its single value.
@param name header name
@param value header value
Removes all occurrences of the given header in this stub response ( using a case insensitive search ) and sets its single value .