Rabbit-R1/original r1/java/sources/kotlin/Result.java
2024-05-21 17:08:36 -04:00

148 lines
8.1 KiB
Java

package kotlin;
import androidx.exifinterface.media.ExifInterface;
import io.sentry.SentryEvent;
import java.io.Serializable;
import kotlin.jvm.JvmInline;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* compiled from: Result.kt */
@Metadata(d1 = {"\u00008\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u000b\n\u0002\u0010\u0003\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0005\b\u0087@\u0018\u0000 \"*\u0006\b\u0000\u0010\u0001 \u00012\u00060\u0002j\u0002`\u0003:\u0002\"#B\u0013\b\u0001\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005¢\u0006\u0004\b\u0006\u0010\u0007J\u001a\u0010\u0010\u001a\u00020\t2\b\u0010\u0011\u001a\u0004\u0018\u00010\u0005HÖ\u0003¢\u0006\u0004\b\u0012\u0010\u0013J\u000f\u0010\u0014\u001a\u0004\u0018\u00010\u0015¢\u0006\u0004\b\u0016\u0010\u0017J\u0012\u0010\u0018\u001a\u0004\u0018\u00018\u0000H\u0087\\u0006\u0004\b\u0019\u0010\u0007J\u0010\u0010\u001a\u001a\u00020\u001bHÖ\u0001¢\u0006\u0004\b\u001c\u0010\u001dJ\u000f\u0010\u001e\u001a\u00020\u001fH\u0016¢\u0006\u0004\b \u0010!R\u0011\u0010\b\u001a\u00020\t8F¢\u0006\u0006\u001a\u0004\b\n\u0010\u000bR\u0011\u0010\f\u001a\u00020\t8F¢\u0006\u0006\u001a\u0004\b\r\u0010\u000bR\u0018\u0010\u0004\u001a\u0004\u0018\u00010\u00058\u0000X\u0081\u0004¢\u0006\b\n\u0000\u0012\u0004\b\u000e\u0010\u000f\u0088\u0001\u0004\u0092\u0001\u0004\u0018\u00010\u0005¨\u0006$"}, d2 = {"Lkotlin/Result;", ExifInterface.GPS_DIRECTION_TRUE, "Ljava/io/Serializable;", "Lkotlin/io/Serializable;", "value", "", "constructor-impl", "(Ljava/lang/Object;)Ljava/lang/Object;", "isFailure", "", "isFailure-impl", "(Ljava/lang/Object;)Z", "isSuccess", "isSuccess-impl", "getValue$annotations", "()V", "equals", "other", "equals-impl", "(Ljava/lang/Object;Ljava/lang/Object;)Z", "exceptionOrNull", "", "exceptionOrNull-impl", "(Ljava/lang/Object;)Ljava/lang/Throwable;", "getOrNull", "getOrNull-impl", "hashCode", "", "hashCode-impl", "(Ljava/lang/Object;)I", "toString", "", "toString-impl", "(Ljava/lang/Object;)Ljava/lang/String;", "Companion", "Failure", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
@JvmInline
/* loaded from: classes3.dex */
public final class Result<T> implements Serializable {
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = new Companion(null);
private final Object value;
/* renamed from: box-impl, reason: not valid java name */
public static final /* synthetic */ Result m5697boximpl(Object obj) {
return new Result(obj);
}
/* renamed from: constructor-impl, reason: not valid java name */
public static <T> Object m5698constructorimpl(Object obj) {
return obj;
}
/* renamed from: equals-impl, reason: not valid java name */
public static boolean m5699equalsimpl(Object obj, Object obj2) {
return (obj2 instanceof Result) && Intrinsics.areEqual(obj, ((Result) obj2).getValue());
}
/* renamed from: equals-impl0, reason: not valid java name */
public static final boolean m5700equalsimpl0(Object obj, Object obj2) {
return Intrinsics.areEqual(obj, obj2);
}
public static /* synthetic */ void getValue$annotations() {
}
/* renamed from: hashCode-impl, reason: not valid java name */
public static int m5703hashCodeimpl(Object obj) {
if (obj == null) {
return 0;
}
return obj.hashCode();
}
public boolean equals(Object obj) {
return m5699equalsimpl(this.value, obj);
}
public int hashCode() {
return m5703hashCodeimpl(this.value);
}
/* renamed from: unbox-impl, reason: not valid java name and from getter */
public final /* synthetic */ Object getValue() {
return this.value;
}
private /* synthetic */ Result(Object obj) {
this.value = obj;
}
/* renamed from: isSuccess-impl, reason: not valid java name */
public static final boolean m5705isSuccessimpl(Object obj) {
return !(obj instanceof Failure);
}
/* renamed from: isFailure-impl, reason: not valid java name */
public static final boolean m5704isFailureimpl(Object obj) {
return obj instanceof Failure;
}
/* JADX WARN: Multi-variable type inference failed */
/* renamed from: getOrNull-impl, reason: not valid java name */
private static final T m5702getOrNullimpl(Object obj) {
if (m5704isFailureimpl(obj)) {
return null;
}
return obj;
}
/* renamed from: exceptionOrNull-impl, reason: not valid java name */
public static final Throwable m5701exceptionOrNullimpl(Object obj) {
if (obj instanceof Failure) {
return ((Failure) obj).exception;
}
return null;
}
public String toString() {
return m5706toStringimpl(this.value);
}
/* renamed from: toString-impl, reason: not valid java name */
public static String m5706toStringimpl(Object obj) {
return obj instanceof Failure ? ((Failure) obj).toString() : "Success(" + obj + ')';
}
/* compiled from: Result.kt */
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0003\n\u0002\b\u0005\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\"\u0010\u0003\u001a\b\u0012\u0004\u0012\u0002H\u00050\u0004\"\u0004\b\u0001\u0010\u00052\u0006\u0010\u0006\u001a\u00020\u0007H\u0087\\u0006\u0002\u0010\bJ\"\u0010\t\u001a\b\u0012\u0004\u0012\u0002H\u00050\u0004\"\u0004\b\u0001\u0010\u00052\u0006\u0010\n\u001a\u0002H\u0005H\u0087\\u0006\u0002\u0010\u000b¨\u0006\f"}, d2 = {"Lkotlin/Result$Companion;", "", "()V", "failure", "Lkotlin/Result;", ExifInterface.GPS_DIRECTION_TRUE, SentryEvent.JsonKeys.EXCEPTION, "", "(Ljava/lang/Throwable;)Ljava/lang/Object;", "success", "value", "(Ljava/lang/Object;)Ljava/lang/Object;", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
private final <T> Object success(T value) {
return Result.m5698constructorimpl(value);
}
private final <T> Object failure(Throwable exception) {
Intrinsics.checkNotNullParameter(exception, "exception");
return Result.m5698constructorimpl(ResultKt.createFailure(exception));
}
}
/* compiled from: Result.kt */
@Metadata(d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0003\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0000\u0018\u00002\u00060\u0001j\u0002`\u0002B\r\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J\u0013\u0010\u0006\u001a\u00020\u00072\b\u0010\b\u001a\u0004\u0018\u00010\tH\u0096\u0002J\b\u0010\n\u001a\u00020\u000bH\u0016J\b\u0010\f\u001a\u00020\rH\u0016R\u0010\u0010\u0003\u001a\u00020\u00048\u0006X\u0087\u0004¢\u0006\u0002\n\u0000¨\u0006\u000e"}, d2 = {"Lkotlin/Result$Failure;", "Ljava/io/Serializable;", "Lkotlin/io/Serializable;", SentryEvent.JsonKeys.EXCEPTION, "", "(Ljava/lang/Throwable;)V", "equals", "", "other", "", "hashCode", "", "toString", "", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public static final class Failure implements Serializable {
public final Throwable exception;
public Failure(Throwable exception) {
Intrinsics.checkNotNullParameter(exception, "exception");
this.exception = exception;
}
public boolean equals(Object other) {
return (other instanceof Failure) && Intrinsics.areEqual(this.exception, ((Failure) other).exception);
}
public int hashCode() {
return this.exception.hashCode();
}
public String toString() {
return "Failure(" + this.exception + ')';
}
}
}