mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-14 01:47:17 +01:00
32 lines
908 B
Java
32 lines
908 B
Java
package dagger.internal;
|
|
|
|
import java.util.Collections;
|
|
import java.util.Map;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes9.dex */
|
|
public final class MapBuilder<K, V> {
|
|
private final Map<K, V> contributions;
|
|
|
|
private MapBuilder(int i) {
|
|
this.contributions = DaggerCollections.newLinkedHashMapWithExpectedSize(i);
|
|
}
|
|
|
|
public static <K, V> MapBuilder<K, V> newMapBuilder(int i) {
|
|
return new MapBuilder<>(i);
|
|
}
|
|
|
|
public Map<K, V> build() {
|
|
return this.contributions.isEmpty() ? Collections.EMPTY_MAP : Collections.unmodifiableMap(this.contributions);
|
|
}
|
|
|
|
public MapBuilder<K, V> put(K k, V v) {
|
|
this.contributions.put(k, v);
|
|
return this;
|
|
}
|
|
|
|
public MapBuilder<K, V> putAll(Map<K, V> map) {
|
|
this.contributions.putAll(map);
|
|
return this;
|
|
}
|
|
}
|