Sets the current value of the parameter, ensuring that it is within the allowed range.
320717
def _set_value(self, new_value):
        """"""

        if self.min_value is not None and new_value < self.min_value:

            raise SettingOutOfBounds(
                "Trying to set parameter {0} = {1}, which is less than the minimum allowed {2}".format(
                    self.name, new_value, self.min_value))

        if self.max_value is not None and new_value > self.max_value:
            raise SettingOutOfBounds(
                "Trying to set parameter {0} = {1}, which is more than the maximum allowed {2}".format(
                    self.name, new_value, self.max_value))

        # Issue a warning if there is an auxiliary variable, as the setting does not have any effect
        if self.has_auxiliary_variable():

            with warnings.catch_warnings():

                warnings.simplefilter("always", RuntimeWarning)

                warnings.warn("You are trying to assign to a parameter which is either linked or "
                              "has auxiliary variables. The assignment has no effect.", RuntimeWarning)

        # Save the value as a pure floating point to avoid the overhead of the astropy.units machinery when
        # not needed

        if self._transformation is None:

            new_internal_value = new_value

        else:

            new_internal_value = self._transformation.forward(new_value)

        # If the parameter has changed, update its value and call the callbacks if needed

        if new_internal_value != self._internal_value:

            # Update
            self._internal_value = new_internal_value

            # Call the callbacks (if any)
            for callback in self._callbacks:

                try:

                    callback(self)

                except:

                    raise NotCallableOrErrorInCall("Could not call callback for parameter %s" % self.name)
1161132
public void setCurrent(String value)
    {
	current.replace(0, current.length(), value);
	cursor = 0;
	limit = current.length();
	limit_backward = 0;
	bra = cursor;
	ket = limit;
    }
1238655
def setParameter(self, parameterName, index, parameterValue):
    
    if hasattr(self, parameterName):
      setattr(self, parameterName, parameterValue)
    else:
      raise Exception("Unknown parameter: " + parameterName)
206912
def set_parameter(self, name, value):
        
        # set the furecast until variable to None if necessary
        if name == "valuesToForecast":
            self._forecastUntil = None

        # continue with the parents implementation
        return super(BaseForecastingMethod, self).set_parameter(name, value)
808769
def set_load_current(self, current_amps):
        
        new_val = int(round(current_amps * 1000))
        if not 0 <= new_val <= 30000:
            raise ValueError("Load Current should be between 0-30A")
        self._load_mode = self.SET_TYPE_CURRENT
        self._load_value = new_val
        self.__set_parameters()
733643
def set(self, value):
        """"""
        if self.validate(value):
            #print "Parameter " + self.id + " successfully set to " + repr(value)
            self.hasvalue = True
            self.value = value
            return True
        else:
            #print "Parameter " + self.id + " COULD NOT BE set to " + repr(value)
            return False
149614
def set_value(self, value):
        
        parsed_value = self._parse_value(value)
        self.value = parsed_value
694613
private void incrementCurrentValue() {
    currentValues[currentValues.length - 1]++;
    int i = currentValues.length - 1;
    while (i > 0 &&
        currentValues[i] > finalValues[i]) {
      currentValues[i] = 0;
      currentValues[i - 1]++;
      i--;
    }
  }
31777
def set(self, param, value):
        
        self._shouldOwn(param)
        try:
            value = param.typeConverter(value)
        except ValueError as e:
            raise ValueError('Invalid param value given for param "%s". %s' % (param.name, e))
        self._paramMap[param] = value
52432
def setrange(self, key, offset, value):
        
        if not isinstance(offset, int):
            raise TypeError("offset argument must be int")
        if offset < 0:
            raise ValueError("offset must be greater equal 0")
        return self.execute(b'SETRANGE', key, offset, value)
126098
public void setMinValue(final double MIN_VALUE) {
        // check min-max values
        if (Double.compare(MIN_VALUE, maxValue) == 0) {
            throw new IllegalArgumentException("Min value cannot be equal to max value");
        }

        if (Double.compare(MIN_VALUE, maxValue) > 0) {
            minValue = maxValue;
            maxValue = MIN_VALUE;
        } else {
            minValue = MIN_VALUE;
        }
        calculate();
        validate();
        calcAngleStep();
        fireStateChanged();
    }
1363103
protected void setValue(int newPosition, T1[] values, int number,
      boolean currentExisting) {
    if (number > 0) {
      if (currentExisting) {
        T1[] tmpList = operations
            .createVector1(newFullValueList[newPosition].length + number);
        System.arraycopy(newFullValueList[newPosition], 0, tmpList, 0,
            newFullValueList[newPosition].length);
        System.arraycopy(values, 0, tmpList,
            newFullValueList[newPosition].length, number);
        newFullValueList[newPosition] = tmpList;
      } else {
        if (number < values.length) {
          T1[] tmpList = operations.createVector1(number);
          System.arraycopy(values, 0, tmpList, 0, number);
          newFullValueList[newPosition] = tmpList;
        } else {
          newFullValueList[newPosition] = values;
        }
      }
    }
  }
691508
def _set(self, value):
    """"""
    if self.__is_parent_node():
      for child in self.__sub_counters.itervalues():
        child._set(value)
    else:
      self.__counter = value
158337
def set_value(self, value):
        """"""

        if self.data_type == self.BOOLEAN_TYPE:
            self.value_boolean = bool(value)
        elif self.data_type == self.NUMBER_TYPE:
            self.value_number = float(value)
        else:
            self.value = value
797337
def set(self, value, samples=0):
        '''
        
        '''
        if self.params.length > self.pos and samples > 0:
            l = min(samples, self.params.length-self.pos)
            self.data[self.pos:self.pos+l] = np.full(l, value, dtype=np.float)
            self.pos += l
        self.latest = value
        return self
1343465
def set_current(self, value):
        '''
        
        '''
        self.current = value
        self.cursor = 0
        self.limit = len(self.current)
        self.limit_backward = 0
        self.bra = self.cursor
        self.ket = self.limit
244810
def set(self, start, stop, length=None, units='bytes'):
        """"""
        assert is_byte_range_valid(start, stop, length), \
            'Bad range provided'
        self._units = units
        self._start = start
        self._stop = stop
        self._length = length
        if self.on_update is not None:
            self.on_update(self)