discord-jadx/app/src/main/java/j0/f.java

82 lines
2 KiB
Java
Raw Normal View History

2021-11-02 06:38:17 +00:00
package j0;
/* compiled from: Notification */
public final class f<T> {
public static final f<Void> a = new f<>(a.OnCompleted, null, null);
2021-12-17 21:59:34 +00:00
/* renamed from: b reason: collision with root package name */
2022-01-13 08:07:50 +00:00
public final a f3731b;
2021-12-17 21:59:34 +00:00
public final Throwable c;
2021-11-02 06:38:17 +00:00
public final T d;
/* compiled from: Notification */
public enum a {
OnNext,
OnError,
OnCompleted
}
public f(a aVar, T t, Throwable th) {
this.d = t;
2021-12-17 21:59:34 +00:00
this.c = th;
2022-01-13 08:07:50 +00:00
this.f3731b = aVar;
2021-11-02 06:38:17 +00:00
}
public boolean a() {
2022-01-13 08:07:50 +00:00
return (this.f3731b == a.OnError) && this.c != null;
2021-11-02 06:38:17 +00:00
}
public boolean b() {
2022-01-13 08:07:50 +00:00
return (this.f3731b == a.OnNext) && this.d != null;
2021-11-02 06:38:17 +00:00
}
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (obj.getClass() != f.class) {
return false;
}
f fVar = (f) obj;
2022-01-13 08:07:50 +00:00
if (fVar.f3731b != this.f3731b) {
2021-11-02 06:38:17 +00:00
return false;
}
T t = this.d;
T t2 = fVar.d;
if (t != t2 && (t == null || !t.equals(t2))) {
return false;
}
2021-12-17 21:59:34 +00:00
Throwable th = this.c;
Throwable th2 = fVar.c;
2021-11-02 06:38:17 +00:00
return th == th2 || (th != null && th.equals(th2));
}
public int hashCode() {
2022-01-13 08:07:50 +00:00
int hashCode = this.f3731b.hashCode();
2021-11-02 06:38:17 +00:00
if (b()) {
hashCode = (hashCode * 31) + this.d.hashCode();
}
2021-12-17 21:59:34 +00:00
return a() ? (hashCode * 31) + this.c.hashCode() : hashCode;
2021-11-02 06:38:17 +00:00
}
public String toString() {
StringBuilder sb = new StringBuilder(64);
sb.append('[');
sb.append(super.toString());
sb.append(' ');
2022-01-13 08:07:50 +00:00
sb.append(this.f3731b);
2021-11-02 06:38:17 +00:00
if (b()) {
sb.append(' ');
sb.append((Object) this.d);
}
if (a()) {
sb.append(' ');
2021-12-17 21:59:34 +00:00
sb.append(this.c.getMessage());
2021-11-02 06:38:17 +00:00
}
sb.append(']');
return sb.toString();
}
}