Sets the attributes of the record instance.

 @param [Array<String>] values the record attributes (as parsed from a record string)
494650
def set_attributes(values)
      import_indices([values.length - 1, @max_elements - 1].min).each_with_index do |indices, i|
        param = nil
        if indices
          param = values.values_at(*indices)
          param = param[0] if param.length == 1
        end
        self.send("#{@attributes[i]}=", param)
      end
      @crc = values[-1]
    end
1205665
function setFieldValues (data, isRecord) {
    // skip if no data
    if (!data) {
        return
    }
    // get values for fields
    _.each(this.fields, field => {
        // if field is array set value for each field in array
        if (Array.isArray(field)) {
            _.each(field, field => this.setFieldValue(data, field, isRecord))
        }
        // set value for field
        else {
            this.setFieldValue(data, field, isRecord)
        }
    })
}
1289982
def instance_set(attribute, value)
      setter = :"#{self.name}_#{attribute}="
      self.instance.send(setter, value) if instance.respond_to?(setter)
    end
511328
public final void setAttributes(final Map<String, Attribute> attributes) {
        for (Map.Entry<String, Attribute> entry: attributes.entrySet()) {
            Object attribute = entry.getValue();
            if (!(attribute instanceof Attribute)) {
                final String msg =
                        "Attribute: '" + entry.getKey() + "' is not an attribute. It is a: " + attribute;
                LOGGER.error("Error setting the Attributes: {}", msg);
                throw new IllegalArgumentException(msg);
            } else {
                ((Attribute) attribute).setConfigName(entry.getKey());
            }
        }
        this.attributes = attributes;
    }
1080890
def attributes=(attrs = {})
      attrs.each do |attr_name, value|
        setter = "#{attr_name}="
        send(setter, value)
      end
    end
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);
			}
		}
	}
1364174
public void setValues(
                    final Collection<?> values
                    )
    {
        if (values != _values) {
            clear();
            if (values == null  ||  values.size() == 0) {
                return;
            }

            for (Object  value : values) {
                addValue( value );
            }
        }
    }
720627
public function setAttrArray(array $attributes)
    {
        foreach ($attributes as $attribute => $value) {
            $this->setAttr($attribute, $value);
        }
    }
895778
def init_with_attributes(attributes, new_record = false) # :nodoc:
      @new_record = new_record
      @attributes = attributes

      init_internals

      yield self if block_given?

      _run_find_callbacks
      _run_initialize_callbacks

      self
    end
811752
def attributes=(attributes = {})
      attributes.each_pair { |k, v|
        respond_to?(name = "#{k}=") and send(name, v) or self[k] = v
      }
    end
1161110
public void setAttributes(Attribute[] v) {
        this.attributes = v;
        this.numberAttributes=v.length;
        this.indexValues = new int[numberAttributes];
        for (int i = 0; i < numberAttributes; i++) {
            this.indexValues[i]=i;
        }
    }
773213
def _set_attrs_to_values(self, response={}):
        
        for key in response.keys():
            setattr(self, key, response[key])
1188200
public void setRecords(java.util.Collection<Record> records) {
        if (records == null) {
            this.records = null;
            return;
        }

        this.records = new com.amazonaws.internal.SdkInternalList<Record>(records);
    }
395223
def set_attrs!(attrs)
      attrs.each do |name, value|
        ivar = :"@#{name.to_s.sub(/\?$/, '_q_')}"
        instance_variable_set(ivar, value)
      end
    end
1117477
public void setRecords(java.util.Collection<Record> records) {
        if (records == null) {
            this.records = null;
            return;
        }

        this.records = new java.util.ArrayList<Record>(records);
    }
752190
def add_attributes(hash)
      hash.each_pair do |k,v|
        k = k.to_sym
        #raise DuplicateAttribute.new("#{k}") unless (k == :id or !self.respond_to?(k))
        if k == :id or !self.respond_to?(k)
          @cached_attrs[k] = v
          meta = class << self; self; end
          meta.send(:define_method, k) { @cached_attrs[k] }
          meta.send(:define_method, "#{k}=") do |new_value| 
            @cached_attrs[k] = new_value.is_a?(RedisRecord::Model) ? new_value.id : new_value
            @stored_attrs.delete(k)
          end
        end
      end
      hash
    end
142411
def set(value)
    if value.nil?
      @is_nil = true
      @data = nil
      _set(nil)
    else
      @is_nil = false
      _set(screen_data(value))
    end
  end