将多个key:value对应值组合成一个Map，items长度必须是偶数, 参数个数若是奇数的话，最后一个会被忽略
类似 JDK9中的 Map.of 方法

@param <K>   泛型
@param <V>   泛型
@param items 键值对

@return Map
191059
public static <K, V> Map<K, V> ofMap(Object... items) {
        HashMap<K, V> map = new LinkedHashMap<>(Math.max(1, items.length / 2));
        int len = items.length / 2;
        for (int i = 0; i < len; i++) {
            map.put((K) items[i * 2], (V) items[i * 2 + 1]);
        }
        return map;
    }
542184
public FacetBuilder setItemsList(Map<String, String> items) {
        ArrayList<FacetWidgetItem> facetWidgetItems = new ArrayList<FacetWidgetItem>();

        for (String key : items.keySet()){
            String label = items.get(key);
            FacetWidgetItem facetWidgetItem = new FacetWidgetItem(key, label);
            facetWidgetItems.add(facetWidgetItem);
        }
        this.listItems = facetWidgetItems;
        return this;
    }
237832
function mapXSetItems (items) {
  let results = [];
  for (let i = 0; i < items.length; i += 1) {
    results.push({
      timestamp: items[i][0],
      field: items[i][1][0],
      value: items[i][1][1]
    });
  }
  return results;
}
474966
public void map(Collection<I> items, T target)
    {
        for (I item : items)
        {
            map(item, target);
        }
    }
519514
public static ValueIndex valueIndex(@NonNull ValueIndexItem... items) {
        if (items == null) {
            throw new IllegalArgumentException("items cannot be null.");
        }
        return new ValueIndex(items);
    }
670199
@SuppressWarnings("unchecked")
	public static <K, V> ArrayList<V> valuesOfKeys(Map<K, V> map, K... keys) {
		final ArrayList<V> values = new ArrayList<>();
		for (K k : keys) {
			values.add(map.get(k));
		}
		return values;
	}
980237
public T match(Collection<I> items)
    {
        for (I item : items)
        {
            T match = match(item);
            if (match != null)
            {
                return match;
            }
        }
        return null;
    }
876398
public static <K, V> Collection<V> values(final Map<K, V> object) {
        return object.values();
    }
507252
public static StringValueMap fromMaps(Map<?, ?>... maps) {
		StringValueMap result = new StringValueMap();
		if (maps != null && maps.length > 0) {
			for (Map<?, ?> map : maps)
				result.append(map);
		}
		return result;
	}
997079
public static <KType, VType> KTypeVTypeHashMap<KType, VType> from(KType[] keys, VType[] values) {
    if (keys.length != values.length) {
      throw new IllegalArgumentException("Arrays of keys and values must have an identical length.");
    }

    KTypeVTypeHashMap<KType, VType> map = new KTypeVTypeHashMap<>(keys.length);
    for (int i = 0; i < keys.length; i++) {
      map.put(keys[i], values[i]);
    }

    return map;
  }
1321614
public static <K, V> Map<K, V> toMap(Iterator<K> keys, Iterator<V> values) {
		return toMap(keys, values, false);
	}
1051996
public static Expression newLinkedHashMap(
      Iterable<? extends Expression> keys, Iterable<? extends Expression> values) {
    return newMap(keys, values, ConstructorRef.LINKED_HASH_MAP_CAPACITY, LINKED_HASH_MAP_TYPE);
  }
973914
public static <T, C extends Collection<T>> Map<T, C> makeElementsToContainersMap(
      final Iterable<C> collections) {
    final ImmutableMap.Builder<T, C> ret = ImmutableMap.builder();

    for (final C collection : collections) {
      for (final T item : collection) {
        ret.put(item, collection);
      }
    }

    return ret.build();
  }
927150
public static <K, V, M extends Map<K, V>> M putAll (
        M map, Iterable<? extends Map<? extends K, ? extends V>> values)
    {
        for (Map<? extends K, ? extends V> val : values) {
            map.putAll(val);
        }
        return map;
    }
1104805
public static Map toMap(Object[] keys, Object[] values) {
		Map map = new HashMap<>();
		int i = 0;
		for (Object key : keys) {
			map.put(key, values[i++]);
		}
		return map;
	}
744077
public ModelAdapter<Model, Item> set(List<Model> items) {
        return set(items, true);
    }
115058
public static <K, V> void putIntoListMap(K key, V value, Map<? super K, List<V>> map) {
		List<V> list = map.get(key);
		if (list == null) {
			list = Lists.newArrayListWithCapacity(2);
			map.put(key, list);
		}
		list.add(value);
	}