package io.reactivex; import io.reactivex.internal.functions.ObjectHelper; import io.reactivex.internal.util.NotificationLite; /* loaded from: classes2.dex */ public final class Notification { static final Notification b = new Notification<>(null); final Object a; private Notification(Object obj) { this.a = obj; } public static Notification f() { return (Notification) b; } public Throwable a() { Object obj = this.a; if (NotificationLite.isError(obj)) { return NotificationLite.getError(obj); } return null; } public T b() { Object obj = this.a; if (obj == null || NotificationLite.isError(obj)) { return null; } return (T) this.a; } public boolean c() { return this.a == null; } public boolean d() { return NotificationLite.isError(this.a); } public boolean e() { Object obj = this.a; return (obj == null || NotificationLite.isError(obj)) ? false : true; } public boolean equals(Object obj) { if (obj instanceof Notification) { return ObjectHelper.a(this.a, ((Notification) obj).a); } return false; } public int hashCode() { Object obj = this.a; if (obj != null) { return obj.hashCode(); } return 0; } public String toString() { Object obj = this.a; if (obj == null) { return "OnCompleteNotification"; } if (NotificationLite.isError(obj)) { return "OnErrorNotification[" + NotificationLite.getError(obj) + "]"; } return "OnNextNotification[" + this.a + "]"; } public static Notification a(T t) { ObjectHelper.a((Object) t, "value is null"); return new Notification<>(t); } public static Notification a(Throwable th) { ObjectHelper.a(th, "error is null"); return new Notification<>(NotificationLite.error(th)); } }