The touch method can be used to renew an element and move it to the from of the LRU queue.

@param key   The key of the element to renew
@param value A value to newly associate with the key
14115
public synchronized void touch(final Object key, final Object value) {
        remove(key);
        put(key, value);
    }
1023242
public void setString(Element el, String key, String value) {
	if (value != null) el.setAttribute(key, value);
    }
51333
public synchronized void release(int key, T value) {
    LinkedEntry<T> bucket = mMap.get(key);
    if (bucket == null) {
      bucket = new LinkedEntry<T>(null, key, new LinkedList<T>(), null);
      mMap.put(key, bucket);
    }

    bucket.value.addLast(value);

    moveToFront(bucket);
  }
516756
public static void put(String key, Object value) {
		contextMap.get().put(key, value);
	}
939210
public synchronized void setAttribute(String key, Boolean value)
	{
		if(attributes.containsKey(key))
		{
			attributes.remove(key);
		}
		attributes.put(key, value);
	}
898509
public RetResult<T> attach(String key, Object value) {
        if (this.attach == null) this.attach = new HashMap<>();
        boolean canstr = value != null && (value instanceof CharSequence || value instanceof Number || value.getClass().isPrimitive());
        this.attach.put(key, value == null ? null : (canstr ? String.valueOf(value) : JsonConvert.root().convertTo(value)));
        return this;
    }
1087400
public static void put(final String key, final String value) {
		try {
			systemRoot.put(fixKey(key), value);
		} catch (final Exception e) {
			System.err.print(e);
		}
	}
1286248
private void addElement(String key, String value) {
        this.num_items++;
        List<String> vals = this.values.get(key);
        if (null == vals) {
            vals = new LinkedList<String>();
        }
        if (null == value) {
            vals.add("\"\"");
        } else {
            vals.add(value);
        }
        this.values.put(key, vals);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "addElement: " + key + "=" + value + " num: " + this.num_items);
        }
    }
369968
public T put(final int key, final T value) {
		int index = ((key & 0x7FFFFFFF) % elementKeys.length);
		T oldvalue = null;

		long entry = elementKeys[index];
		if (entry == Integer.MIN_VALUE) {
			++elementCount;
		} else {
			oldvalue = elementValues[index];
			collisions++;
		}
		elementKeys[index] = key;
		elementValues[index] = value;
		return oldvalue;
	}
306351
synchronized public void set(Element value) {
    int bind = ((int)value.getIndex() & Integer.MAX_VALUE) % buckets.length;
    Element[] bucket = buckets[bind];
    int count = counts[bind];
    if (bucket == null)
      buckets[bind] = bucket = new Element[initBucketSize];
    else if (bucket.length == count) {
      bucket = new Element[count * 2];
      System.arraycopy(buckets[bind], 0, bucket, 0, count);
      buckets[bind] = bucket;
    }
    bucket[count] = value;
    counts[bind] = count + 1;
    totalSize += 1;
  }
1010460
public void setAttribute(String key, Object value) {

        if (m_attributes == null) {
            m_attributes = new HashMap<String, Object>(4);
        }
        m_attributes.put(key, value);
    }
787010
@Override
    public Object touch(Object coll, Collection.Key key) throws PageException {
	Object o = getCollection(coll, key, null);
	if (o != null) return o;
	return set(coll, key, new StructImpl());
    }
32859
public void updateEvent(String key, String value) {
        updateEvent(key, value, true, true);
    }
844758
protected void updateActivationProperty(ActivationProperty value, String xmlTag, Counter counter, Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null);
         findAndReplaceSimpleElement(innerCount, root, "value", value.getValue(), null);
      }
   }
361917
function (value) {
    // find out the touch-action by the event handlers
    if (value == TOUCH_ACTION_COMPUTE) {
      value = this.compute();
    }

    if (NATIVE_TOUCH_ACTION) {
      this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;
    }
    this.actions = value.toLowerCase().trim();
  }
837390
private void touch(final int l) {
        int lit = l;
        if (lit < 0) { lit = -lit; }
        final long newPriority = (long) occs(lit).count() + occs(-lit).count();
        if (!var(lit).free()) { return; }
        final LNGLongPriorityQueue queue = currentCands();
        queue.update(lit, -newPriority);
        if (this.schedule && !queue.contains(lit)) { queue.push(lit); }
    }
594205
public void put(final String key, final String value) {
        if (StringUtils.isBlank(value)) {
            this.properties.remove(key);
        } else {
            this.properties.put(key, value);
        }
    }