package z4; import java.io.IOException; import java.io.StringWriter; /* loaded from: classes2.dex */ public abstract class h { public abstract h a(); public boolean b() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public double c() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public float d() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public int e() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public g f() { if (k()) { return (g) this; } throw new IllegalStateException("Not a JSON Array: " + this); } public k g() { if (m()) { return (k) this; } throw new IllegalStateException("Not a JSON Object: " + this); } public n h() { if (n()) { return (n) this; } throw new IllegalStateException("Not a JSON Primitive: " + this); } public long i() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public String j() { throw new UnsupportedOperationException(getClass().getSimpleName()); } public boolean k() { return this instanceof g; } public boolean l() { return this instanceof j; } public boolean m() { return this instanceof k; } public boolean n() { return this instanceof n; } public String toString() { try { StringWriter stringWriter = new StringWriter(); g5.c cVar = new g5.c(stringWriter); cVar.z0(true); b5.l.b(this, cVar); return stringWriter.toString(); } catch (IOException e10) { throw new AssertionError(e10); } } }