链式Map创建

@param k Key类型
@param v Value类型
@return 当前类
160171
public MapBuilder<K, V> put(K k, V v) {
		map.put(k, v);
		return this;
	}
671627
public static <K, V> HashMap<K, V> of(K key, V value) {
		return of(key, value, false);
	}
759454
public V putIfAbsent(K k, V v) {
    synchronized (map) {
      if (!containsKey(k)) {
        list.addFirst(k);
        return map.put(k, v);
      } else {
        list.remove(k);
      }
      list.addFirst(k);
      return null;
    }
  }
1107358
public static <K, V> Map<V, K> inverse(Map<K, V> map) {
        return inverse(map, false);
    }
1313830
public static <K, V> Map<K, V> sortNumberMapByKeyDescending(Map<K, V> map) {
        return sortNumberMapByKeyDescending(map.entrySet());
    }
604358
public static <K, V> Map<K, V> toMap(final Iterable<Map.Entry<K, V>> iterable) {
        final Map<K, V> result = newLinkedHashMap();
        for (Map.Entry<K, V> entry : iterable) {
            result.put(entry.getKey(), entry.getValue());
        }
        return result;
    }
371570
public <K, V> Map<K, V> map(String name, Class<K> ktype, Class<V> vtype) {
        Map<K, V> map = getNamedObject(name);
        if (map == null) putNamedObject(name, map = new HashMap<K, V>());
        return map;
    }
861746
static String mapEntryToString(Object key, Object val) {
        final String k, v;
        final int klen, vlen;
        final char[] chars =
            new char[(klen = (k = objectToString(key)).length()) +
                     (vlen = (v = objectToString(val)).length()) + 1];
        k.getChars(0, klen, chars, 0);
        chars[klen] = '=';
        v.getChars(0, vlen, chars, klen + 1);
        return new String(chars);
    }
1037332
public V get(final K key) {
		if (map.containsKey(key)) {
			// remove from queue and add it again in FIFO queue
			queue.remove(key);
			queue.add(key);
		}
		return map.get(key);
	}
440314
@Override
    protected Entry<K, V> get(K k) {
        return mHashMap.get(k);
    }
1045664
@Override
    public Version put(K key, V value) {
        return put(key, new Versioned<V>(value));
    }
1309776
public V _put(K key, V value) {
        V retval=map.put(key, value);
        for(Notification notif:notifs)
            notif.entrySet(key, value);
        return retval;
    }
971620
public static <K, V> Map<K, V> cast(Map<?, ?> map) {
    return map == null ? null : new CastingMap<K, V>(map);
  }
355653
public static <K, V> Set<K> keys(final Map<K, V> object) {
        return object.keySet();
    }
838905
public Map.Entry<K, V> getEntry(Object key) {
    EntryImpl<K, V> entry = _entries[keyHash(key) & _mask];
    while (entry != null) {
      if (key.equals(entry._key)) { return entry; }
      entry = entry._next;
    }
    return null;
  }
1289716
public static <K, V> Map<K, V> copy(final Map<K, V> map) {
		if (map == null) {
			return null;
		}

		TypeEnum keyType = null;
		TypeEnum valueType = null;

		Map<K, V> copy = new HashMap<K, V>();
		for (Map.Entry<K, V> entry : map.entrySet()) {
			K key = entry.getKey();
			V value = entry.getValue();

			K keyCopy = null;
			if (key != null) {
				if (keyType == null) {
					keyType = TypeEnum.dataTypeOf(key.getClass());
				}
				keyCopy = copy(key, keyType);
			}

			V valueCopy = null;
			if (value != null) {
				if (valueType == null) {
					valueType = TypeEnum.dataTypeOf(value.getClass());
				}
				valueCopy = copy(value, valueType);
			}

			copy.put(keyCopy, valueCopy);
		}

		return copy;
	}
974533
public V put(K key, V value) {
    return _cacheImpl.put(key, value);
  }