Provides a function that returns the key of the entry when invoked.
@param <K> key type of the entry
@param <V> value type of the entry
@return a function that when applied to a given entry will return the key
9576
public static <K, V> Function<Map.Entry<K, V>, K> entryToKeyFunction() {
      return EntryToKeyFunction.getInstance();
   }
17287
static <K> K key(TreeMapEntry<K,?> e) {
        if (e==null)
            throw new NoSuchElementException();
        return e.key;
    }
974533
public V put(K key, V value) {
    return _cacheImpl.put(key, value);
  }
1262959
public static final <K, V> Map<K, V> map(K key, V value) {
        Map<K, V> map = new HashMap<>();
        map.put(key, value);
        return map;
    }
898274
public static <K,V> Function<K,V> map2fun(final Map<K,V> map) {
	return new Function<K,V>() {
	    public V f(K key) {
		V value = map.get(key);
		if(value == null) {
		    throw new Error("No value for " + key);
		}
		return value;
	    }
	};
    }
258145
static <K, V> K keyOrNull(OMVRBTreeEntryPosition<K, V> e) {
    return e == null ? null : e.getKey();
  }
965214
public <T> T get(String key, T defaultValue) {
        T value = get(key);
        if (value == null) {
            return defaultValue;
        }
        return value;
    }
1122769
private Entry<K, V> getEntry(K key) {
        final K k = key;
        
        return new Entry<K, V>() {
            public boolean equals(Object ob) {
                if( ob instanceof Entry ) {
                    Entry entry = (Entry)ob;
                    
                    if( !entry.getKey().equals(getKey()) ) {
                        return false;
                    }
                    if( !entry.getValue().equals(getValue()) ) {
                        return false;
                    }
                    return true;
                }
                return false;
            }

            public K getKey() {
                return k;
            }

            public V getValue() {
                return ConcurrentCache.this.get(getKey());
            }

            public V setValue(V val) {
                return ConcurrentCache.this.put(getKey(), val);
            }
        };
    }
1103037
public static Object toPersistenceType(Object value, Class<?> parameterType) {
    if (!isTypeConversionRequired(parameterType)) {
      return value;
    }
    if (Map.class.isAssignableFrom(parameterType) && (value instanceof Map)) {
      Map<?, ?> map = (Map<?, ?>)value;
      Map.Entry<?, ?>[] entries = Iterators.toArray(map.entrySet().iterator(), Map.Entry.class);
      String[] stringArray = new String[entries.length];
      for (int i = 0; i < entries.length; i++) {
        Map.Entry<?, ?> entry = entries[i];
        String entryKey = Objects.toString(entry.getKey(), "");
        String entryValue = Objects.toString(entry.getValue(), "");
        stringArray[i] = ConversionStringUtils.encodeString(entryKey) + KEY_VALUE_DELIMITER + ConversionStringUtils.encodeString(entryValue);
      }
      return stringArray;
    }
    throw new IllegalArgumentException("Type conversion not supported: " + parameterType.getName());
  }
882753
public static <K, V> Function<Map.Entry<K, V>, String> toStringWithKeyValueSeparator(
      final String separator) {
    return new EntryJoinerFunction<>(separator);
  }
60440
public <T> T get(String key, Class<T> type) {
        Object value = this.data.get(key);
        if (value != null && type.isAssignableFrom(value.getClass())) {
            return (T) value;
        }
        return null;
    }
1122782
public Return put(final Return.ReturnValues _key,
                      final Object _value)
    {
        this.map.put(_key, _value);
        return this;
    }
1033552
public KeyOperationsParameters withValue(byte[] value) {
        if (value == null) {
            this.value = null;
        } else {
            this.value = Base64Url.encode(value);
        }
        return this;
    }
1146917
public static <K, V> Map<K, V> wrap(final String key, final Object value) {
        val map = new LinkedHashMap();
        if (value != null && StringUtils.isNotBlank(key)) {
            map.put(key, value);
        }
        return map;
    }
131664
public Integer getVarDataKey(FieldType type)
   {
      Integer result = null;
      FieldItem item = m_map.get(type);
      if (item != null)
      {
         result = item.getVarDataKey();
      }
      return result;
   }
210755
private static Conversion<?> getTypeConversion(
			Object typeKey, Object value) {

		// Check if the provided value is already of the target type
		if (typeKey instanceof Class && ((Class)typeKey)!=Object.class
				&& ((Class)typeKey).isInstance(value)) {
			return IDENTITY_CONVERSION;
		}

		// Find the type conversion object
		return (value instanceof Convertible)
			? ((Convertible)value).getTypeConversion(typeKey)
			: typeConversions.get(typeKey);
	}
390493
public V get(K key)
  {
    Entry<V> entry = _cache.get(key);

    if (entry == null)
      return null;

    if (entry.isValid())
      return entry.getValue();
    else {
      _cache.remove(key);

      return null;
    }
  }