Store a new value for the given stream.

        Args:
            value (IOTileReading): The value to store.  The stream
                parameter must have the correct value
183766
def push(self, value):
        

        stream = DataStream.FromEncoded(value.stream)

        if stream.stream_type == DataStream.OutputType:
            if len(self.streaming_data) == self.streaming_length:
                raise StorageFullError('Streaming buffer full')

            self.streaming_data.append(value)
        else:
            if len(self.storage_data) == self.storage_length:
                raise StorageFullError('Storage buffer full')

            self.storage_data.append(value)
859285
def update(self, value):
        

        value = int(value)

        with self.lock:
            self.value += value
13231
public void setValue(Object value) {
        if (logger.isDebugEnabled()) {
            logger.debug("Setting buffered value to '" + value + "'");
        }
        final Object oldValue = getValue();
        this.bufferedValue = value;
        updateBuffering();
        fireValueChange(oldValue, bufferedValue);
    }
1368855
protected void setValue(Object value) {
        this.value = value;
        serializedValue = null;
        timeStamp = System.currentTimeMillis();
        this.valueHashcode = 0;
    }
108313
public void setValue(Object value) {
    if (value instanceof Iterable<?>) {
      this.value = stream((Iterable<?>) value).map(this::toValue).collect(toList());
    } else {
      this.value = toValue(value);
    }
  }
580490
def updateCurrentValue(self, value):
        
        xsnap = None
        ysnap = None
        
        if value != self.endValue():
            xsnap = self.targetObject().isXSnappedToGrid()
            ysnap = self.targetObject().isYSnappedToGrid()
            
            self.targetObject().setXSnapToGrid(False)
            self.targetObject().setYSnapToGrid(False)
        
        super(XNodeAnimation, self).updateCurrentValue(value)
        
        if value != self.endValue():
            self.targetObject().setXSnapToGrid(xsnap)
            self.targetObject().setYSnapToGrid(ysnap)
1371463
def set(self, value: int):
        
        max_value = int(''.join(['1' for _ in range(self._bit_width)]), 2)

        if value > max_value:
            raise ValueError('the value {} is larger than '
                             'the maximum value {}'.format(value, max_value))

        self._value = value
        self._text_update()
935435
public void add( float value ) {
		// see if it needs to grow the queue
		if( size >= data.length) {
			data[start] = value;
			start = (start+1)%data.length;
		} else {
			data[(start+size)%data.length] = value;
			size++;
		}
	}
149332
def store(self, name, value, atype, new_name=None, multiplier=None, allowed_values=None):
        '''  '''
        if value is not None:
            _bad_type = (not isinstance(value, atype))
            if not _bad_type:
                # special case
                _bad_type = (isinstance(value, bool) and atype == int)

            if _bad_type:
                # could be a special value
                if allowed_values and value in allowed_values:
                    allowed_values = None
                else:
                    raise ValueError("%s should be value of type (%s)" % (name, atype.__name__))

            if allowed_values:
                if isinstance(value, str):
                    if value not in allowed_values:
                        raise ValueError("%s can be %s" % (name, allowed_values))
                elif isinstance(value, int):
                    if isinstance(allowed_values[0], int):
                        if value < allowed_values[0]:
                            raise ValueError("%s must be >= %d" % (name, allowed_values[0]))

            _val = value if not multiplier else (multiplier * value)
            _name = name if not new_name else new_name
            self._dict[_name] = _val
446212
def setValue(self, value):
        
        if value >= self.minimum() and value <= self.maximum():
            self._lineEdit.setText(str(value))
        elif value < self.minimum():
            self._lineEdit.setText(str(self.minimum()))
        elif value > self.maximum():
            self._lineEdit.setText(str(self.maximum()))
        return True
633538
protected void readd (int value)
    {
        int mask = _buckets.length - 1;
        int start = hash(value) & mask, idx = start;
        do {
            if (_buckets[idx] == _sentinel) {
                _buckets[idx] = value;
                return;
            }
        } while ((idx = idx + 1 & mask) != start);

        // we shouldn't get here
        throw new RuntimeException("Ran out of buckets readding value " + value);
    }
579208
public static <T> Stream<T> of(final T value) {
        return new Stream<T>() {
            @Override
            public Iterator<T> iterator() {
                return new ReadOnlyIterator<T>() {

                    boolean has = true;

                    @Override
                    public boolean hasNext() {
                        return has;
                    }

                    @Override
                    public T next() {
                        has = false;
                        return value;
                    }
                };
            }
        };
    }
587281
def set(self, value):
        '''
        
        '''
        with self._reference.get_lock():
            self._reference.value = value
            return value
501610
public synchronized boolean put(byte value) {
        if (available == capacity) {
            return false;
        }
        buffer[idxPut] = value;
        idxPut = (idxPut + 1) % capacity;
        available++;
        return true;
    }
745216
def setValue(self, value):
        
        self.__value = projex.text.decoded(value) if isinstance(value, (str, unicode)) else value
880463
def update(self, value):
    
    super(ExponentiallyDecayingReservoir, self).update(value)

    timestamp = self.clock.time()

    self.__rescaleIfNeeded()
    priority = self.__weight(timestamp - self.startTime) / random.random()

    self.count += 1
    if (self.count <= self.size):
      self.values[priority] = value
    else:
      first = min(self.values)

      if first < priority and priority not in self.values:
        self.values[priority] = value
        while first not in self.values:
          first = min(self.values)

        del self.values[first]
1353775
def readonce(self, size = None):
        
        if self.eof:
            raise EOFError
        if self.errored:
            raise IOError('Stream is broken before EOF')
        if size is not None and size < len(self.data) - self.pos:
            ret = self.data[self.pos: self.pos + size]
            self.pos += size
            return ret
        else:
            ret = self.data[self.pos:]
            self.pos = len(self.data)
            if self.dataeof:
                self.eof = True
            return ret