113 lines
3.1 KiB
Java
113 lines
3.1 KiB
Java
package com.discord.nullserializable;
|
|
|
|
import d0.z.d.m;
|
|
import java.io.Serializable;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
/* compiled from: NullSerializable.kt */
|
|
public abstract class NullSerializable<T> implements Serializable {
|
|
private final T value;
|
|
|
|
/* compiled from: NullSerializable.kt */
|
|
public static final class a<T> extends NullSerializable<T> {
|
|
private final T value;
|
|
|
|
public a() {
|
|
this(null, 1);
|
|
}
|
|
|
|
public a(T t) {
|
|
super(null, null);
|
|
this.value = t;
|
|
if (t != null) {
|
|
throw new IllegalArgumentException("value must be null");
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
public /* synthetic */ a(Object obj, int i) {
|
|
this(null);
|
|
int i2 = i & 1;
|
|
}
|
|
|
|
@Override // com.discord.nullserializable.NullSerializable
|
|
public T a() {
|
|
return this.value;
|
|
}
|
|
|
|
@Override // java.lang.Object
|
|
public boolean equals(Object obj) {
|
|
if (this != obj) {
|
|
return (obj instanceof a) && m.areEqual(this.value, ((a) obj).value);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override // java.lang.Object
|
|
public int hashCode() {
|
|
T t = this.value;
|
|
if (t != null) {
|
|
return t.hashCode();
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
@Override // java.lang.Object
|
|
public String toString() {
|
|
StringBuilder P = c.d.b.a.a.P("Null(value=");
|
|
P.append((Object) this.value);
|
|
P.append(")");
|
|
return P.toString();
|
|
}
|
|
}
|
|
|
|
/* compiled from: NullSerializable.kt */
|
|
public static final class b<T> extends NullSerializable<T> {
|
|
private final T value;
|
|
|
|
public b(T t) {
|
|
super(t, null);
|
|
this.value = t;
|
|
}
|
|
|
|
@Override // com.discord.nullserializable.NullSerializable
|
|
public T a() {
|
|
return this.value;
|
|
}
|
|
|
|
@Override // java.lang.Object
|
|
public boolean equals(Object obj) {
|
|
if (this != obj) {
|
|
return (obj instanceof b) && m.areEqual(this.value, ((b) obj).value);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override // java.lang.Object
|
|
public int hashCode() {
|
|
T t = this.value;
|
|
if (t != null) {
|
|
return t.hashCode();
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
@Override // java.lang.Object
|
|
public String toString() {
|
|
StringBuilder P = c.d.b.a.a.P("Value(value=");
|
|
P.append((Object) this.value);
|
|
P.append(")");
|
|
return P.toString();
|
|
}
|
|
}
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: java.lang.Object */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public NullSerializable(Object obj, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this.value = obj;
|
|
}
|
|
|
|
public T a() {
|
|
return this.value;
|
|
}
|
|
}
|