Set object

@param mixed $index
@param Currency $newval
960308
public function offsetSet($index, $newval)
    {
        if (!$newval instanceof $this->currencyClass) {
            throw new \InvalidArgumentException(sprintf('$newval must be an instance of Currency, instance of "%s" given', get_class($newval)));
        }

        parent::offsetSet($index, $newval);
    }
102721
public function append($value)
    {
        if (!$value instanceof $this->currencyClass) {
            throw new \InvalidArgumentException(sprintf('$newval must be an instance of Currency, instance of "%s" given', get_class($value)));
        }

        parent::append($value);
    }
1359868
public T set(T newValue) {
		final T obj = this.object;
		this.object = newValue;
		return obj;
	}
371807
function (newValue) {

            var data = this._data;
            if (newValue == null) {
                // a null value is allowed for the selectedIndex property, but it cannot be used to set the property
                // as it means several items are selected and we do not know which ones
                // just ignore the null value
                return;
            }
            var items = data.items;

            if (newValue < 0) {
                return false;
            } else if (newValue >= items.length) {
                return false;
            } else {

                this.json.setValue(data, "focusIndex", newValue);
                this.setFocus(data.focusIndex);
                return true;

            }
        }
1098379
public function offsetSet($index, $value)
    {
        if (is_array($value)) {
            $this->{$index} = new self($value);
        } else {
            $this->{$index} = $value;
        }
    }
393098
public void putAt(final int index, final Object newValue) {
        final GPathResult result = (GPathResult)getAt(index);
        if (newValue instanceof Closure) {
            result.replaceNode((Closure)newValue);
        } else {
            result.replaceBody(newValue);
        }
    }
1279758
public function toNewIndex(int $newIndex)
    {
        if ($newIndex <= 0) {
            throw InvalidArgumentException::format(
                'Invalid call to %s: new order index must be >=1, %d given',
                __METHOD__, $newIndex
            );
        }

        $this->newIndex = $newIndex;

        return $this;
    }
202987
private void setValue(Object newValue) {
        try {
            if (this.type == null)
                value = newValue;
            else if (this.type.equals("java.lang.String"))
                value = newValue;
            else if (this.type.equals("java.lang.Boolean"))
                value = Boolean.valueOf((String) newValue);
            else if (this.type.equals("java.lang.Integer"))
                value = new Integer(((String) newValue));
            else if (this.type.equals("java.lang.Double"))
                value = new Double(((String) newValue));
            else if (this.type.equals("java.lang.Byte"))
                value = new Byte(((String) newValue));
            else if (this.type.equals("java.lang.Short"))
                value = new Short(((String) newValue));
            else if (this.type.equals("java.lang.Long"))
                value = new Long(((String) newValue));
            else if (this.type.equals("java.lang.Float"))
                value = new Float(((String) newValue));
            else if (this.type.equals("java.lang.Character")) 
                value = Character.valueOf(((String) newValue).charAt(0)); 
            else
                value = newValue;

        } catch (NumberFormatException nfe) {
            Tr.warning(tc, "INCOMPATIBLE_PROPERTY_TYPE_J2CA0207", new Object[] { name, type, newValue });
        }

    }
1284915
public void set(int index, T object) {
        synchronized (mLock) {
            if (mOriginalValues != null) {
                mOriginalValues.set(index, object);
            } else {
                mObjects.set(index, object);
            }
        }
        if (mNotifyOnChange) notifyDataSetChanged();
    }
299065
public function fill($newValue): self
    {
        foreach ($this->values as $index => $value) {
            $this->values[$index] = $newValue;
        }

        return $this;
    }
1166470
public void setProperty(Object object, String property, Object newValue) {
        setProperty(theClass, object, property, newValue, false, false);
    }
383994
public final void setNewVertexValue(VV newValue) {
		if (setNewVertexValueCalled) {
			throw new IllegalStateException("setNewVertexValue should only be called at most once per updateVertex");
		}
		setNewVertexValueCalled = true;

		outVertex.f1 = newValue;

		out.collect(Either.Left(outVertex));
	}
800027
public function offsetSet($index, $newval)
    {
        if (!$newval instanceof TableOfContents\File) {
            throw new \InvalidArgumentException('A table of contents may only be filled with File objects');
        }

        $basename = basename($newval->getFilename());
        if (strpos($basename, '.') !== false) {
            $basename = substr($basename, 0, strpos($basename, '.'));
        }

        if (strtolower($basename) === 'index') {
            $this->modules[] = $newval;
        }

        parent::offsetSet($newval->getFilename(), $newval);
    }
559036
public static void setIsClonedServer(Boolean newVal) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "setIsClonedServer", newVal);
        isCloned = newVal;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "setIsClonedServer");
    }
805109
public void set1Value(int index, String newValue) {
        try {
            value.set( index, newValue );
        }
        catch (IndexOutOfBoundsException e) {
            Log.e(TAG, "X3D MFString set1Value(int index, ...) out of bounds." + e);
        }
        catch (Exception e) {
            Log.e(TAG, "X3D MFString set1Value(int index, ...)  exception " + e);
        }
    }
741019
def set(self, value):
        """"""
        self._elk.send(cx_encode(self._index, value))
319210
public final void set(int i, int newValue) {
        if (fullWidth) {
            array.set(i, newValue);
            return;
        }

        boolean success = false;
        int index = getIndex(i);
        int subIndex = getSubIndex(i);
        while (!success) {
            int prev = array.get(index);
            int next = pack(prev, newValue, subIndex);
            success = array.compareAndSet(index, prev, next);
        }
    }