public void put(String name, List<String> list) {
        remove(name);
        for (String v : list)
            if (v != null)
                add(name, v);
    }
public void put ( String name , List < String > list ) { remove ( name ) ; for ( String v : list ) if ( v != null ) add ( name , v ) ; }
Set a field.

@param name the name of the field
@param list the List value of the field. If null the field is cleared.