package c.q.d;

import java.util.Arrays;

/* JADX INFO: compiled from: Intrinsics.java */
/* JADX INFO: loaded from: classes.dex */
public class j {
    private j() {
    }

    public static boolean a(Object obj, Object obj2) {
        return obj == null ? obj2 == null : obj.equals(obj2);
    }

    public static void b(Object obj, String str) {
        if (obj != null) {
            return;
        }
        IllegalStateException illegalStateException = new IllegalStateException(str + " must not be null");
        d(illegalStateException);
        throw illegalStateException;
    }

    public static void c(Object obj, String str) {
        if (obj != null) {
            return;
        }
        h(str);
        throw null;
    }

    private static <T extends Throwable> T d(T t) {
        e(t, j.class.getName());
        return t;
    }

    static <T extends Throwable> T e(T t, String str) {
        StackTraceElement[] stackTrace = t.getStackTrace();
        int length = stackTrace.length;
        int i = -1;
        for (int i2 = 0; i2 < length; i2++) {
            if (str.equals(stackTrace[i2].getClassName())) {
                i = i2;
            }
        }
        t.setStackTrace((StackTraceElement[]) Arrays.copyOfRange(stackTrace, i + 1, length));
        return t;
    }

    public static String f(String str, Object obj) {
        return str + obj;
    }

    public static void g() {
        c.c cVar = new c.c();
        d(cVar);
        throw cVar;
    }

    private static void h(String str) {
        StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[3];
        IllegalArgumentException illegalArgumentException = new IllegalArgumentException("Parameter specified as non-null is null: method " + stackTraceElement.getClassName() + "." + stackTraceElement.getMethodName() + ", parameter " + str);
        d(illegalArgumentException);
        throw illegalArgumentException;
    }

    public static void i(String str) {
        c.i iVar = new c.i(str);
        d(iVar);
        throw iVar;
    }

    public static void j(String str) {
        i("lateinit property " + str + " has not been initialized");
        throw null;
    }
}
