@Override public void putAll(Map<? extends byte[], ? extends byte[]> m) { this.map.putAll(m); }
public void putAll(Map<? extends K, ? extends V> map) { this.delegate.putAll(map); }
@Override public void putAll(Map<? extends K, ? extends V> map) { this.delegate.putAll(map); }
private SortedMap<String,String> mapToSortedMap(Map<String,String> data){ SortedMap<String,String> sortedEnvMap = new TreeMap<String,String>(); sortedEnvMap.putAll( data ); return sortedEnvMap; }
private SortedMap<String,String> mapToSortedMap(Map<String,String> data){ SortedMap<String,String> sortedEnvMap = new TreeMap<String,String>(); sortedEnvMap.putAll( data ); return sortedEnvMap; }
@Override public <K extends Comparable<K>, V> SortedMap<K, V> create(Map<K, V> map) { SortedMap<K, V> result = Maps.newTreeMap(); result.putAll(map); return result; } },
private Properties( Map<String, Object> properties ) { this.properties.putAll( properties ); }
@Override @SuppressWarnings("unchecked") public void putAll(Map other) { write(); subMap.putAll( other ); }
@Override public void putAll(Map<? extends K, ? extends V> map) { checkInit(); delegate.putAll( map ); }
@Override public ConsumerBuilder<T> properties(@NonNull Map<String, String> properties) { checkArgument(!properties.isEmpty(), "properties cannot be empty"); properties.entrySet().forEach(entry -> checkArgument( StringUtils.isNotBlank(entry.getKey()) && StringUtils.isNotBlank(entry.getValue()), "properties' key/value cannot be blank")); conf.getProperties().putAll(properties); return this; }
@Override public ProducerBuilder<T> properties(@NonNull Map<String, String> properties) { checkArgument(!properties.isEmpty(), "properties cannot be empty"); properties.entrySet().forEach(entry -> checkArgument(StringUtils.isNotBlank(entry.getKey()) && StringUtils.isNotBlank(entry.getValue()), "properties' key/value cannot be blank")); conf.getProperties().putAll(properties); return this; }
/** * Restores events and DAGNodes of all workflows within a script This enables * to replay all the workflows when the script finishes */ @Override public void restoreEventStack() { _eventMap.putAll(allEvents); service.getDagNodeNameMap(null).putAll(allDagNodes); }
/** * Computes the difference between two sorted maps, using the comparator of the left map, or * {@code Ordering.natural()} if the left map uses the natural ordering of its elements. This * difference is an immutable snapshot of the state of the maps at the time this method is called. * It will never change, even if the maps change at a later time. * * <p>Since this method uses {@code TreeMap} instances internally, the keys of the right map must * all compare as distinct according to the comparator of the left map. * * <p><b>Note:</b>If you only need to know whether two sorted maps have the same mappings, call * {@code left.equals(right)} instead of this method. * * @param left the map to treat as the "left" map for purposes of comparison * @param right the map to treat as the "right" map for purposes of comparison * @return the difference between the two maps * @since 11.0 */ public static <K, V> SortedMapDifference<K, V> difference( SortedMap<K, ? extends V> left, Map<? extends K, ? extends V> right) { checkNotNull(left); checkNotNull(right); Comparator<? super K> comparator = orNaturalOrder(left.comparator()); SortedMap<K, V> onlyOnLeft = Maps.newTreeMap(comparator); SortedMap<K, V> onlyOnRight = Maps.newTreeMap(comparator); onlyOnRight.putAll(right); // will whittle it down SortedMap<K, V> onBoth = Maps.newTreeMap(comparator); SortedMap<K, MapDifference.ValueDifference<V>> differences = Maps.newTreeMap(comparator); doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences); return new SortedMapDifferenceImpl<>(onlyOnLeft, onlyOnRight, onBoth, differences); }
private Map<String, List<String>> getTierPathsInternal() { SortedMap<String, List<String>> tierToDirPaths = new TreeMap<>(getTierAliasComparator()); tierToDirPaths.putAll(mStoreMeta.getDirectoryPathsOnTiers()); return tierToDirPaths; }
@Override protected SortedMap<String, String> create(Entry<String, String>[] entries) { SortedMap<String, String> map = new NonNavigableSortedMap(); putEntries(map, entries); map.putAll(ENTRIES_TO_FILTER); return Maps.filterKeys(map, FILTER_KEYS); } })
private enum EntryFunction implements Function<Entry<?, ?>, Object> { KEY { @Override @NullableDecl public Object apply(Entry<?, ?> entry) { return entry.getKey(); } }, VALUE { @Override @NullableDecl public Object apply(Entry<?, ?> entry) { return entry.getValue(); } }; }
@Override protected SortedMap<String, String> create(Entry<String, String>[] entries) { SortedMap<String, String> map = new NonNavigableSortedMap(); putEntries(map, entries); map.putAll(ENTRIES_TO_FILTER); return Maps.filterValues(map, FILTER_VALUES); } })
@Override protected SortedMap<String, String> create(Entry<String, String>[] entries) { SortedMap<String, String> map = new NonNavigableSortedMap(); putEntries(map, entries); map.putAll(ENTRIES_TO_FILTER); return Maps.filterEntries(map, FILTER_ENTRIES); } })
/** * Computes the difference between two sorted maps, using the comparator of the left map, or * {@code Ordering.natural()} if the left map uses the natural ordering of its elements. This * difference is an immutable snapshot of the state of the maps at the time this method is called. * It will never change, even if the maps change at a later time. * * <p>Since this method uses {@code TreeMap} instances internally, the keys of the right map must * all compare as distinct according to the comparator of the left map. * * <p><b>Note:</b>If you only need to know whether two sorted maps have the same mappings, call * {@code left.equals(right)} instead of this method. * * @param left the map to treat as the "left" map for purposes of comparison * @param right the map to treat as the "right" map for purposes of comparison * @return the difference between the two maps * @since 11.0 */ public static <K, V> SortedMapDifference<K, V> difference( SortedMap<K, ? extends V> left, Map<? extends K, ? extends V> right) { checkNotNull(left); checkNotNull(right); Comparator<? super K> comparator = orNaturalOrder(left.comparator()); SortedMap<K, V> onlyOnLeft = Maps.newTreeMap(comparator); SortedMap<K, V> onlyOnRight = Maps.newTreeMap(comparator); onlyOnRight.putAll(right); // will whittle it down SortedMap<K, V> onBoth = Maps.newTreeMap(comparator); SortedMap<K, MapDifference.ValueDifference<V>> differences = Maps.newTreeMap(comparator); doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences); return new SortedMapDifferenceImpl<>(onlyOnLeft, onlyOnRight, onBoth, differences); }