class HttpFields implements Iterable<HttpField> {

    public void put(HttpField field) {
        boolean put = false;
        for (int i = size; i-- > 0; ) {
            HttpField f = fields[i];
            if (f.isSameName(field)) {
                if (put) {
                    System.arraycopy(fields, i + 1, fields, i, --size - i);
                } else {
                    fields[i] = field;
                    put = true;
                }
            }
        }
        if (!put)
            add(field);
    }

    public  HttpFields();
    public  HttpFields(int capacity);
    public  HttpFields(HttpFields fields);

}