package com.google.android.gms.internal.ads;

import androidx.annotation.Nullable;
import java.nio.ByteBuffer;
import java.util.HashMap;

/* JADX INFO: loaded from: classes2.dex */
public final class fg2 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final HashMap f11216a;

    public fg2() {
        this.f11216a = new HashMap();
    }

    public final fg2 zzd(String str, @Nullable String str2) {
        this.f11216a.put(str, str2);
        return this;
    }

    public final fg2 zze(String str, @Nullable ByteBuffer byteBuffer) {
        HashMap map = this.f11216a;
        if (byteBuffer == null) {
            map.put(str, null);
        } else {
            ByteBuffer byteBufferAllocate = ByteBuffer.allocate(byteBuffer.remaining());
            byteBufferAllocate.put(byteBuffer.duplicate());
            byteBufferAllocate.flip();
            map.put(str, byteBufferAllocate);
        }
        return this;
    }

    public /* synthetic */ fg2(tg2 tg2Var) {
        this.f11216a = new HashMap(tg2Var.f16893a);
    }
}
