package kotlinx.coroutines;

/* JADX INFO: compiled from: JobSupport.kt */
/* JADX INFO: loaded from: classes.dex */
public final class c2 extends kotlinx.coroutines.o2.h implements n1 {
    @Override // kotlinx.coroutines.n1
    public c2 b() {
        return this;
    }

    @Override // kotlinx.coroutines.n1
    public boolean isActive() {
        return true;
    }

    public final String q(String str) {
        StringBuilder sb = new StringBuilder();
        sb.append("List{");
        sb.append(str);
        sb.append("}[");
        boolean z = true;
        for (kotlinx.coroutines.o2.j jVarJ = (kotlinx.coroutines.o2.j) i(); !h.x.d.k.a(jVarJ, this); jVarJ = jVarJ.j()) {
            if (jVarJ instanceof y1) {
                y1 y1Var = (y1) jVarJ;
                if (z) {
                    z = false;
                } else {
                    sb.append(", ");
                }
                sb.append(y1Var);
            }
        }
        sb.append("]");
        String string = sb.toString();
        h.x.d.k.c(string, "StringBuilder().apply(builderAction).toString()");
        return string;
    }

    @Override // kotlinx.coroutines.o2.j
    public String toString() {
        return r0.c() ? q("Active") : super.toString();
    }
}
