package h.b.p;

import g.h0.c.b0;
import h.b.p.a0.e0;

/* JADX INFO: compiled from: JsonElement.kt */
/* JADX INFO: loaded from: classes.dex */
@g.i
public final class r extends y {
    public final boolean a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final String f4580b;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public r(Object obj, boolean z) {
        super(null);
        g.h0.c.l.f(obj, "body");
        this.a = z;
        this.f4580b = obj.toString();
    }

    @Override // h.b.p.y
    public String b() {
        return this.f4580b;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || !g.h0.c.l.a(b0.a(r.class), b0.a(obj.getClass()))) {
            return false;
        }
        r rVar = (r) obj;
        return this.a == rVar.a && g.h0.c.l.a(this.f4580b, rVar.f4580b);
    }

    public int hashCode() {
        return this.f4580b.hashCode() + (Boolean.hashCode(this.a) * 31);
    }

    @Override // h.b.p.y
    public String toString() {
        if (!this.a) {
            return this.f4580b;
        }
        StringBuilder sb = new StringBuilder();
        e0.a(sb, this.f4580b);
        String string = sb.toString();
        g.h0.c.l.e(string, "StringBuilder().apply(builderAction).toString()");
        return string;
    }
}
