Add a record.
@param values fields of the record
494299
public void addRecord(Object[] values) {
		if (this.closed) {
			throw new IllegalStateException("You can add records a closed DBFWriter");
		}
		if (this.header.fieldArray == null) {
			throw new DBFException("Fields should be set before adding records");
		}

		if (values == null) {
			throw new DBFException("Null cannot be added as row");
		}

		if (values.length != this.header.fieldArray.length) {
			throw new DBFException("Invalid record. Invalid number of fields in row");
		}

		for (int i = 0; i < this.header.fieldArray.length; i++) {
			Object value = values[i];
			if (value == null) {
				continue;
			}

			switch (this.header.fieldArray[i].getType()) {

			case CHARACTER:
				if (!(value instanceof String)) {
					throw new DBFException("Invalid value for field " + i + ":" + value);
				}
				break;

			case LOGICAL:
				if (!(value instanceof Boolean)) {
					throw new DBFException("Invalid value for field " + i + ":" + value);
				}
				break;

			case DATE:
				if (!(value instanceof Date)) {
					throw new DBFException("Invalid value for field " + i + ":" + value);
				}
				break;
			case NUMERIC:
			case FLOATING_POINT:
				if (!(value instanceof Number)) {
					throw new DBFException("Invalid value for field " + i + ":" + value);
				}
				break;
			default:
				throw new DBFException("Unsupported writting of field type " + i + " "
						+ this.header.fieldArray[i].getType());
			}

		}

		if (this.raf == null) {
			this.v_records.add(values);
		} else {
			try {
				writeRecord(this.raf, values);
				this.recordCount++;
			} catch (IOException e) {
				throw new DBFException("Error occured while writing record. " + e.getMessage(), e);
			}
		}
	}
629884
public DB2ESImportBuilder addFieldValue(String fieldName, Object value){
		addFieldValue(  fieldValues,  fieldName,  value);
		return this;
	}
22529
function add(/* values... */) {
  var self = this

  self.values.push.apply(self.values, arguments)

  return self
}
345403
public void addFieldValues(String fieldName, Collection<String> values) {
        Utils.require(!Utils.isEmpty(fieldName), "fieldName");
        
        if (values != null && values.size() > 0) {
            if (fieldName.charAt(0) == '_') {
                Utils.require(values.size() == 1, "System fields can have only 1 value: " + fieldName);
                setSystemField(fieldName, values.iterator().next());
            } else {
                List<String> currValues = m_valueMap.get(fieldName);
                if (currValues == null) {
                    currValues = new ArrayList<>();
                    m_valueMap.put(fieldName, currValues);
                }
                currValues.addAll(values);
            }
        }
    }
576856
public final void setExceptionInserts(String[] values) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setExceptionInserts", values);
        boolean wasEmpty = (getHdr2().getChoiceField(JsHdr2Access.EXCEPTION) == JsHdr2Access.IS_EXCEPTION_EMPTY);
        if (values != null) {
            getHdr2().setField(JsHdr2Access.EXCEPTION_DETAIL_INSERTS, values);
        }
        else {
            getHdr2().setField(JsHdr2Access.EXCEPTION_DETAIL_INSERTS, null);
        }
        if (wasEmpty)
        {
            // Need to mark the optional exception fields as empty
            getHdr2().setChoiceField(JsHdr2Access.EXCEPTION_DETAIL_PROBLEMDESTINATION, JsHdr2Access.IS_EXCEPTION_DETAIL_PROBLEMDESTINATION_EMPTY);
            getHdr2().setChoiceField(JsHdr2Access.EXCEPTION_DETAIL_PROBLEMSUBSCRIPTION, JsHdr2Access.IS_EXCEPTION_DETAIL_PROBLEMSUBSCRIPTION_EMPTY);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setExceptionInserts");
    }
542999
public void add(FloatArrayList values) {
        ensureCapacity(size + values.size);
        for (int i=0; i<values.size; i++) {
            this.add(values.elements[i]);
        }
    }
417865
public void addMultipleItems(int times, final Object... values) {
		for (int i = 0; i < times; i++) {
            addItemAsArray(values);
        }
	}
414730
public void add(SingleImageRecord record) {
        if (records == null)
            records = new ArrayList<>();
        records.add(record);
    }
1364174
public void setValues(
                    final Collection<?> values
                    )
    {
        if (values != _values) {
            clear();
            if (values == null  ||  values.size() == 0) {
                return;
            }

            for (Object  value : values) {
                addValue( value );
            }
        }
    }
1332887
@Override
    public void putAll(final Collection<T> values) {
        if (values == null || values.size() == 0) {
            return;
        }
        for (final T value : values) {
            put(value);
        }
    }
1107581
def setFieldValues( fields, editRecord=true )
      if fields.is_a?(Hash)
          clearFieldValuePairList
          fields.each{ |fieldName,fieldValue|
             addFieldValuePair( fieldName, nil, nil, fieldValue )
          }
          if editRecord and @dbid and (@rid or @key)
            editRecord( @dbid, @rid, @fvlist, nil, nil, nil, nil, nil, @key )
          end
      end
   end
68787
protected void addIdInCollectionCondition(final Expression<?> property, final Collection<?> values) {
        if (values == null || values.isEmpty()) {
            fieldConditions.add(getCriteriaBuilder().equal(property, -1));
        } else {
            fieldConditions.add(property.in(values));
        }
    }
1040298
public void setHeaderValues(String name,String[] values)
    {
        _fields.put(name,Arrays.asList(values));
    }
72438
public static void addFieldValue(List<FieldMeta> fieldValues,String fieldName,Object value){
		FieldMeta fieldMeta = new FieldMeta();
		fieldMeta.setEsFieldName(fieldName);
		fieldMeta.setValue(value);
		fieldValues.add(fieldMeta);
	}
498236
@Override
    public void putAll(final T[] values) {
        if (values == null || values.length == 0) {
            return;
        }
        for (final T value : values) {
            put(value);
        }
    }
914078
public function addField($field, $value=null) {
        $this->fields[] = $field;
        if ($value != null) $this->set($field, $value);
    }
229965
private void addItems(Map<String, String> values) {
        for (String itemName : values.keySet()) {
            setItem(itemName, values.get(itemName));
        }
    }