package com.facetec.sdk; import java.math.BigInteger; /* loaded from: classes.dex */ public final class eh extends eb { private final Object e; public eh(Boolean bool) { this.e = er.a(bool); } public eh(Number number) { this.e = er.a(number); } public eh(String str) { this.e = er.a(str); } public final boolean k() { return this.e instanceof Boolean; } @Override // com.facetec.sdk.eb public final boolean j() { if (k()) { return ((Boolean) this.e).booleanValue(); } return Boolean.parseBoolean(b()); } public final boolean m() { return this.e instanceof Number; } @Override // com.facetec.sdk.eb public final Number e() { Object obj = this.e; return obj instanceof String ? new eu((String) obj) : (Number) obj; } public final boolean n() { return this.e instanceof String; } @Override // com.facetec.sdk.eb public final String b() { if (m()) { return e().toString(); } if (k()) { return ((Boolean) this.e).toString(); } return (String) this.e; } @Override // com.facetec.sdk.eb public final double c() { return m() ? e().doubleValue() : Double.parseDouble(b()); } @Override // com.facetec.sdk.eb public final long d() { return m() ? e().longValue() : Long.parseLong(b()); } @Override // com.facetec.sdk.eb public final int a() { return m() ? e().intValue() : Integer.parseInt(b()); } public final int hashCode() { long doubleToLongBits; if (this.e == null) { return 31; } if (c(this)) { doubleToLongBits = e().longValue(); } else { Object obj = this.e; if (obj instanceof Number) { doubleToLongBits = Double.doubleToLongBits(e().doubleValue()); } else { return obj.hashCode(); } } return (int) (doubleToLongBits ^ (doubleToLongBits >>> 32)); } public final boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } eh ehVar = (eh) obj; if (this.e == null) { return ehVar.e == null; } if (c(this) && c(ehVar)) { return e().longValue() == ehVar.e().longValue(); } Object obj2 = this.e; if ((obj2 instanceof Number) && (ehVar.e instanceof Number)) { double doubleValue = e().doubleValue(); double doubleValue2 = ehVar.e().doubleValue(); return doubleValue == doubleValue2 || (Double.isNaN(doubleValue) && Double.isNaN(doubleValue2)); } return obj2.equals(ehVar.e); } private static boolean c(eh ehVar) { Object obj = ehVar.e; if (!(obj instanceof Number)) { return false; } Number number = (Number) obj; return (number instanceof BigInteger) || (number instanceof Long) || (number instanceof Integer) || (number instanceof Short) || (number instanceof Byte); } }