package com.huawei.hms.common.internal; import com.airbnb.deeplinkdispatch.UrlTreeKt; import com.huawei.hms.framework.common.ContainerUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /* loaded from: classes2.dex */ public final class Objects { /* loaded from: classes2.dex */ public static final class ToStringHelper { private final List a; private final Object b; public final ToStringHelper add(String str, Object obj) { String str2 = (String) Preconditions.checkNotNull(str); String valueOf = String.valueOf(obj); StringBuilder sb = new StringBuilder(str2.length() + valueOf.length() + 1); sb.append(str2); sb.append(ContainerUtils.KEY_VALUE_DELIMITER); sb.append(valueOf); this.a.add(sb.toString()); return this; } public final String toString() { String simpleName = this.b.getClass().getSimpleName(); StringBuilder sb = new StringBuilder(100); sb.append(simpleName); sb.append(UrlTreeKt.componentParamPrefixChar); int size = this.a.size(); for (int i = 0; i < size; i++) { sb.append(this.a.get(i)); if (i < size - 1) { sb.append(", "); } } sb.append(UrlTreeKt.componentParamSuffixChar); return sb.toString(); } private ToStringHelper(Object obj) { this.b = Preconditions.checkNotNull(obj); this.a = new ArrayList(); } } private Objects() { throw new AssertionError("Uninstantiable"); } public static boolean equal(Object obj, Object obj2) { if (obj == obj2) { return true; } return obj != null && obj.equals(obj2); } public static int hashCode(Object... objArr) { return Arrays.hashCode(objArr); } public static boolean isNull(Object... objArr) { if (objArr == null) { return true; } for (Object obj : objArr) { if (obj == null) { return true; } } return false; } public static ToStringHelper toStringHelper(Object obj) { return new ToStringHelper(obj); } }