- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
41 lines
1.3 KiB
Java
41 lines
1.3 KiB
Java
package com.google.common.collect;
|
|
|
|
import com.google.common.base.Preconditions;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public abstract class CollectPreconditions {
|
|
public static void checkEntryNotNull(Object obj, Object obj2) {
|
|
if (obj == null) {
|
|
String valueOf = String.valueOf(obj2);
|
|
StringBuilder sb = new StringBuilder(valueOf.length() + 24);
|
|
sb.append("null key in entry: null=");
|
|
sb.append(valueOf);
|
|
throw new NullPointerException(sb.toString());
|
|
}
|
|
if (obj2 != null) {
|
|
return;
|
|
}
|
|
String valueOf2 = String.valueOf(obj);
|
|
StringBuilder sb2 = new StringBuilder(valueOf2.length() + 26);
|
|
sb2.append("null value in entry: ");
|
|
sb2.append(valueOf2);
|
|
sb2.append("=null");
|
|
throw new NullPointerException(sb2.toString());
|
|
}
|
|
|
|
public static int checkNonnegative(int i, String str) {
|
|
if (i >= 0) {
|
|
return i;
|
|
}
|
|
StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 40);
|
|
sb.append(str);
|
|
sb.append(" cannot be negative but was: ");
|
|
sb.append(i);
|
|
throw new IllegalArgumentException(sb.toString());
|
|
}
|
|
|
|
public static void checkRemove(boolean z) {
|
|
Preconditions.checkState(z, "no calls to next() since the last call to remove()");
|
|
}
|
|
}
|