Allows use of ImmutableMap.of() patterns.
5463
protected static void appendTo(@Nonnull StringBuilder buf, @Nonnull Map<? extends String, ? extends Object> values) {
        for (Map.Entry<? extends String, ? extends Object> e : values.entrySet()) {
            if (buf.length() > 0)
                buf.append(",");
            buf.append(e.getKey());
            Object value = e.getValue();
            if (value != null)
                buf.append('=').append(value);
        }
    }
1190661
public static <T, R> Iterable<R> map(final Iterable<T> iterable, final IFunction<T, R> mapper) {
        return new Iterable<R>() {
            @Override
            public Iterator<R> iterator() {
                return map(iterable.iterator(), mapper);
            }
        };
    }
799217
private ImmutableMap<Predicate,ImmutableList<TermType>> extractCastTypeMap(
            Multimap<Predicate, CQIE> ruleIndex, List<Predicate> predicatesInBottomUp,
            ImmutableMap<CQIE, ImmutableList<Optional<TermType>>> termTypeMap, DBMetadata metadata) {

        // Append-only
        Map<Predicate,ImmutableList<TermType>> mutableCastMap = Maps.newHashMap();

        for (Predicate predicate : predicatesInBottomUp) {
            ImmutableList<TermType> castTypes = inferCastTypes(predicate, ruleIndex.get(predicate), termTypeMap,
                    mutableCastMap,metadata);

            mutableCastMap.put(predicate, castTypes);
        }

        return ImmutableMap.copyOf(mutableCastMap);
    }
809703
@SuppressWarnings("ConstantConditions")
  private ImmutableBiMap<K,V> toImmutableBiMap() {
    final ImmutableBiMap.Builder<K,V> ret = ImmutableBiMap.builder();

    for (final MapEntry<K, V> entry : entries) {
      ret.put(entry.key, entry.value);
    }

    return ret.build();
  }
1039373
private ImmutableMap<String, String> initCustomTagsMap(ImmutableMap<String, String> tags) {
		return ImmutableMap.copyOf(firstNonNull(tags, Collections.<String, String>emptyMap()));
	}
615784
public static <K, V> ImmutableMap<K, V> mapFromPairedKeyValueSequences(
      final Iterable<K> keys, final Iterable<V> values) {
    final ImmutableMap.Builder<K, V> builder = ImmutableMap.builder();
    for (final ZipPair<K, V> pair : zip(keys, values)) {
      builder.put(pair.first(), pair.second());
    }
    return builder.build();
  }
607636
public static MutableRoaringBitmap or(ImmutableRoaringBitmap... bitmaps) {
    SortedMap<Short, List<MappeableContainer>> grouped = groupByKey(bitmaps);
    short[] keys = new short[grouped.size()];
    MappeableContainer[] values = new MappeableContainer[grouped.size()];
    List<List<MappeableContainer>> slices = new ArrayList<>(grouped.size());
    int i = 0;
    for (Map.Entry<Short, List<MappeableContainer>> slice : grouped.entrySet()) {
      keys[i++] = slice.getKey();
      slices.add(slice.getValue());
    }
    IntStream.range(0, i)
            .parallel()
            .forEach(position -> values[position] = or(slices.get(position)));
    return new MutableRoaringBitmap(new MutableRoaringArray(keys, values, i));
  }
487282
def PATTERN(self):
        
        """
        self.update_mapping()
        return u" |\n".join([pattern_unformatted % (f.name, f._pattern) for f in iter(self)])
995953
public static <K, V, V2> MutableMap<K, V2> collectValues(
            Map<K, V> map,
            Function2<? super K, ? super V, ? extends V2> function)
    {
        return MapIterate.collectValues(map, function, UnifiedMap.<K, V2>newMap(map.size()));
    }
107018
public static <K,V> SortedMap<K,V> asImmutable(SortedMap<K, ? extends V> self) {
        return Collections.unmodifiableSortedMap(self);
    }
1143454
@SuppressWarnings("ConstantConditions")
  private ImmutableMap<K,V> toRegularImmutableMap() {
    final ImmutableMap.Builder<K, V>  ret = ImmutableMap.builder();

    for (final MapEntry<K, V> entry : entries) {
      ret.put(entry.key, entry.value);
    }

    return ret.build();
  }
988183
private Object writeMapComplex(SerIterator itemIterator) {
        Map<String, Object> result = new LinkedHashMap<>();
        while (itemIterator.hasNext()) {
            itemIterator.next();
            Object key = itemIterator.key();
            if (key == null) {
                throw new IllegalArgumentException("Unable to write map key as it cannot be null");
            }
            String str = settings.getConverter().convertToString(itemIterator.key());
            if (str == null) {
                throw new IllegalArgumentException("Unable to write map key as it cannot be a null string");
            }
            result.put(str, writeObject(itemIterator.valueType(), itemIterator.value(), itemIterator));
        }
        return result;
    }
947201
def mapping_of(cls):
    """"""
    def mapper(data):
        if not isinstance(data, Mapping):
            raise TypeError(
                "data must be a mapping, not %s"
                % type(data).__name__)
        return {
            key: cls(value)
            for key, value in data.items()
        }
    return mapper
709187
private void resolvePatternSpecificity(Map<String, PatternCacheControl> patterns) {
        List<String> patternList = new ArrayList<>();
        patternList.addAll(patterns.keySet());

        int patternCount = patternList.size();

        for (int i = 0; i < patternCount - 1; i++) {
            String specificPattern = patternList.get(i);
            for (int j = i + 1; j < patternCount; j++) {
                String generalPattern = patternList.get(j);
                checkPatternMatching(patterns, specificPattern, generalPattern);
                checkPatternMatching(patterns, generalPattern, specificPattern);
            }
        }
    }
462632
private Map<String, String> getCustomMap(Pattern keyPattern) {
		Map<String, String> map = new HashMap<>();

		for (Iterator<Object> it = props.keySet().iterator(); it.hasNext();) {
			String key = (String) it.next();
			Matcher matcher = keyPattern.matcher(key);
			if (matcher.matches()) {

				String id = matcher.group(2);
				String propertyValue = props.getProperty(key);
				map.put(id, propertyValue);
			}
		}
		return map;
	}
1321522
function runningMap(a, fn, init) {
  return a.map(v => init = fn(v, init));
}
78834
public static MutableSymbolTable readStringMap(ObjectInput in)
      throws IOException, ClassNotFoundException {

    int mapSize = in.readInt();
    MutableSymbolTable syms = new MutableSymbolTable();
    for (int i = 0; i < mapSize; i++) {
      String sym = in.readUTF();
      int index = in.readInt();
      syms.put(sym, index);
    }
    return syms;
  }