package k.a.q;

import j.p0.d.d0;
import k.a.q.y.h0;

/* JADX INFO: compiled from: JsonElement.kt */
/* JADX INFO: loaded from: classes.dex */
public final class o extends v {
    private final boolean a;
    private final String b;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public o(Object obj, boolean z) {
        super(null);
        j.p0.d.r.f(obj, "body");
        this.a = z;
        this.b = obj.toString();
    }

    @Override // k.a.q.v
    public String b() {
        return this.b;
    }

    public boolean c() {
        return this.a;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || !j.p0.d.r.a(d0.b(o.class), d0.b(obj.getClass()))) {
            return false;
        }
        o oVar = (o) obj;
        return c() == oVar.c() && j.p0.d.r.a(b(), oVar.b());
    }

    public int hashCode() {
        return (Boolean.hashCode(c()) * 31) + b().hashCode();
    }

    @Override // k.a.q.v
    public String toString() {
        if (!c()) {
            return b();
        }
        StringBuilder sb = new StringBuilder();
        h0.c(sb, b());
        String string = sb.toString();
        j.p0.d.r.e(string, "StringBuilder().apply(builderAction).toString()");
        return string;
    }
}
