Adds a new field as part of the form.

@param field the field to add to the form.
335401
public void addField(FormField field) {
        String fieldVariableName = field.getVariable();
        // Form field values must be unique unless they are of type 'fixed', in
        // which case their variable name may be 'null', and therefore could
        // appear multiple times within the same form.
        if (fieldVariableName != null && hasField(fieldVariableName)) {
            throw new IllegalArgumentException("This data form already contains a form field with the variable name '"
                            + fieldVariableName + "'");
        }
        synchronized (fields) {
            fields.put(fieldVariableName, field);
        }
    }
1308830
void addField(final String name, final boolean value)
            throws IllegalStateException {

        addField(name, Boolean.toString(value));

    }
582011
public function addField(FormField $field)
    {
        if ($this->fields->contains($field) === false) {
            $field->setForm($this);
            $this->fields->add($field);
        }

        return $this;
    }
894466
public void addField(String fieldName) throws QueryException {
		EReference feature = null;
		for (TypeDef typeDef : types) {
			if (typeDef.geteClass().getEStructuralFeature(fieldName) == null) {
				throw new QueryException("Class \"" + typeDef.geteClass().getName() + "\" does not have the field \"" + fieldName + "\"");
			}
			if (feature == null) {
				if (!(typeDef.geteClass().getEStructuralFeature(fieldName) instanceof EReference)) {
					throw new QueryException(fieldName + " is not a reference");
				}
				feature = (EReference) typeDef.geteClass().getEStructuralFeature(fieldName);
			} else {
				if (feature != typeDef.geteClass().getEStructuralFeature(fieldName)) {
					throw new QueryException("Classes \"" + typeDef.geteClass().getName() + "\" and \"" + feature.getEContainingClass().getName() + "\" have fields with the same name, but they are not logically the same");
				}
			}
		}
		if (fields == null) {
			fields = new ArrayList<>();
		}
		fields.add(feature);
	}
1301904
public void fieldChanged(Field field)
    {
        BasePanel screenParent = this.getParentScreen();
        if (field == null) if (m_converterField != null) 
            field = m_converterField.getField();   // This field changed
        if (screenParent != null)
            screenParent.fieldChanged(field);
    }
1153978
private void addAll(final List<Field> l, final Field[] fields) {
        for (final Field field : fields) {
            field.setAccessible(true);
            l.add(field);
        }
    }
1038190
def add_field(self, field):
        """"""
        self.remove_field(field.name)
        self._fields[field.name] = field

        if field.default is not None:
            if six.callable(field.default):
                self._default_callables[field.key] = field.default
            else:
                self._defaults[field.key] = field.default
936845
private void storeField(Field field, StructImpl fieldsMap) {
	String fieldName = field.getName();
	Object o = fieldsMap.get(fieldName, null);
	Field[] args;
	if (o == null) {
	    args = new Field[1];
	    fieldsMap.setEL(fieldName, args);
	}
	else {
	    Field[] fs = (Field[]) o;
	    args = new Field[fs.length + 1];
	    for (int i = 0; i < fs.length; i++) {
		fs[i].setAccessible(true);
		args[i] = fs[i];
	    }
	    fieldsMap.setEL(fieldName, args);
	}
	args[args.length - 1] = field;
    }
306443
public static Map<String,Object> addFieldParam(Map<String,Object> map, Field field)
    {
        if (!field.isNull())
            map.put(field.getFieldName(), field.toString());
        return map;
    }
1336566
public final FacetOptions addFacetOnField(Field field) {
		Assert.notNull(field, "Cannot facet on null field.");
		Assert.hasText(field.getName(), "Cannot facet on field with null/empty fieldname.");

		this.facetOnFields.add(field);
		return this;
	}
624593
public GroupOptions addGroupByField(Field field) {

		Assert.notNull(field, "Field for grouping must not be null.");
		Assert.hasText(field.getName(), "Field.name for grouping must not be null/empty.");
		groupByFields.add(field);
		return this;
	}
894277
public EmbedBuilder addField(MessageEmbed.Field field)
    {
        return field == null ? this : addField(field.getName(), field.getValue(), field.isInline());
    }
672602
public void add(HttpFields fields)
    {
        if (fields==null)
            return;

        Enumeration enm = fields.getFieldNames();
        while( enm.hasMoreElements() )
        {
            String name = (String)enm.nextElement();
            Enumeration values = fields.getValues(name);
            while(values.hasMoreElements())
                add(name,(String)values.nextElement());
        }
    }
210048
public function addField(Field $field)
    {
        $tmp               = $this->fields->getValue($this->entity);
        $tmp[$field->name] = $field;
        $this->fields->setValue($this->entity, $tmp);

        if ($field->role == 'id') {
            $key = new \ReflectionProperty(Entity::class, 'key');
            $key->setAccessible(true);
            $key->setValue($this->entity, $field->name);
        }
    }
747777
protected void appendField(final StringBuilder builder, final String key, final int value) {
        if (builder.length() > 0) {
            builder.append("&");
        }
        builder.append(key).append("=").append(value);
    }
466519
public void setCustomFields(Map<String, String> fields) {
        clearCustomFields();
        for (String key : fields.keySet()) {
            CustomField f = new CustomField();
            f.setName(key);
            f.setValue(fields.get(key));
            customFields.add(f);
        }
    }
30961
public void addFieldInfo(final FieldInfo fieldInfo) {
        ArgUtils.notNull(fieldInfo, "fieldInfo");
        
        removeFieldInfo(fieldInfo.getFieldName());
        this.fieldInfos.add(fieldInfo);
    }