Replace value.

@param bodyObj      the body obj
@param replaceValue the replace value
5375
public void replaceValue(Object bodyObj, Object replaceValue) {
        Object parentObj = bodyObj;

        if(this.listChild) {
            ValidationData rootListParent = this.findListParent();
            if(this.deepLevel - rootListParent.deepLevel > 1 ){
                parentObj = this.parent.getValue(bodyObj);
            }
        }
        else {
            if (this.parentId != null) {
                parentObj = this.parent.getValue(bodyObj);
            }
        }

        this.setter(this, parentObj, replaceValue);
    }
517665
public void setValueFromObject(Object valueAsJava) {
 	if ((valueAsJava!=null) && (value==null)) {
 	    if (valueAsJava instanceof QualifiedName) { 
 		this.value=valueAsJava;
 	    } else if (valueAsJava instanceof LangString) { 
 		this.value=valueAsJava;
 	    } else if (valueAsJava instanceof byte[]) {
 		setValueAsJava((byte[]) valueAsJava);
 	    } else if (valueAsJava instanceof org.w3c.dom.Node) {
 		setValueAsJava((org.w3c.dom.Node)valueAsJava);
 	    } else {
 		this.value = valueAsJava.toString();
 	    }
 	}
848440
@Override
  public boolean replaceFailure(K key, V value, V newValue, StoreAccessException e) {
    cleanup(key, e);
    return false;
  }
798315
public final void updateFilterTree(String strKey, Object objValue)
    {
        Object[][] mxProperties = this.cloneMatrix(this.getNameValueTree());
        mxProperties = this.addNameValue(mxProperties, strKey, objValue); // Add/replace this property
        this.setFilterTree(mxProperties);   // Update any remote copy of this.
    }
1316963
public void replace(BaseCell oldOne, BaseCell newOne) {
        VirtualLayoutManager layoutManager = getLayoutManager();
        if (oldOne != null && newOne != null && mGroupBasicAdapter != null && layoutManager != null) {
            int replacePosition = mGroupBasicAdapter.getPositionByItem(oldOne);
            if (replacePosition >= 0) {
                int cardIdx = mGroupBasicAdapter.findCardIdxFor(replacePosition);
                Card card = mGroupBasicAdapter.getCardRange(cardIdx).second;
                card.replaceCell(oldOne, newOne);
                mGroupBasicAdapter.replaceComponent(Arrays.asList(oldOne), Arrays.asList(newOne));
            }
        }
    }
1296848
public void replace(int index, Object value) {
    values.set(index, value);
    this.path = null; // path is no longer valid if values are replaced
  }
812502
private void dumpBodyAttachment(Object requestBodyAttachment) {
        this.bodyContent = config.isMaskEnabled() ? Mask.maskJson(requestBodyAttachment, "requestBody") : requestBodyAttachment.toString();
    }
891992
@Override
    public Object apply(Object value, Object... params) {

        String original = super.asString(value);

        Object needle = super.get(0, params);
        String replacement = "";

        if (needle == null) {
            throw new RuntimeException("invalid pattern: " + needle);
        }

        if (params.length >= 2) {

            Object obj = super.get(1, params);

            if (obj == null) {
                throw new RuntimeException("invalid replacement: " + needle);
            }

            replacement = super.asString(super.get(1, params));
        }

        return original.replace(String.valueOf(needle), String.valueOf(replacement));
    }
245903
public static final <T> Function<Object,T> replaceWith(final T object) {
        return new ReplaceWith<T>(object);
    }
1174002
function replacer(key, value) {
  if (value instanceof Buffer)
    return value.toString('base64');
  // eslint-disable-next-line valid-typeof
  if (typeof value === 'bigint')
    return value.toString();
  return value;
}
1007875
public boolean replace(K key, V oldValue, V newValue) {
        if (oldValue == null || newValue == null) {
            throw new NullPointerException();
        }
        int hash = this.hashOf(key);
        return this.segmentFor(hash).replace(key, hash, oldValue, newValue);
    }
346196
public void setTextValue(String v) {
    if (BodyCitation_Type.featOkTst && ((BodyCitation_Type)jcasType).casFeat_textValue == null)
      jcasType.jcas.throwFeatMissing("textValue", "ch.epfl.bbp.uima.types.BodyCitation");
    jcasType.ll_cas.ll_setStringValue(addr, ((BodyCitation_Type)jcasType).casFeatCode_textValue, v);}
240685
public void put(Object objValue)
    {
        Class<?> classData = this.getNativeClassType();
        try {
            objValue = DataConverters.convertObjectToDatatype(objValue, classData, null);  // I do this just to be careful.
        } catch (Exception ex) {
            objValue = null;
        }
        if (this.getMessage() != null)
            this.getMessage().putNative(this.getFullKey(null), objValue);
    }
332773
@Override
    public Object replaceObject(@Sensitive Object object) {
        if (object instanceof JavaURLContext) {
            JavaURLContext ctx = (JavaURLContext) object;
            JavaURLContextReplacement replacement = new JavaURLContextReplacement();
            replacement.setBase(ctx.getBase().toString());
            try {
                replacement.setEnv(ctx.getEnvironment());
            } catch (NamingException ex) {
                //should never occur, but will log ffdc if it does - and just user a blank hashtable to avoid NPEs
                replacement.setEnv(new Hashtable<Object, Object>());
            }
            return replacement;
        }
        return null;
    }
601489
public void replace(T item) throws IOException {
        removeAll((Class)item.getClass());
        data.add(item);
        onModified();
    }
811163
public static void rename(ObjectNode obj, String oldFieldName, String newFieldName) {
		if (obj != null && isNotBlank(oldFieldName) && isNotBlank(newFieldName)) {
			JsonNode node = remove(obj, oldFieldName);
			if (node != null) {
				obj.set(newFieldName, node);
			}
		}
	}
72077
public boolean replace(Object oldObj, Object newObj)
    {  
        if (nest != null)
        {
            return nest.replace(oldObj, newObj);
        }
        else
        {
            int sz = elements.size();
            for (int i = 0; i < sz; i++)
            {
                if (elements.get(i) == oldObj)
                {
                    elements.set(i,newObj);
                    return true;
                }     
            }
        }
        
        return false;
    }