what-the-bank/sources/com/google/android/libraries/places/internal/zzma.java

35 lines
1.1 KiB
Java

package com.google.android.libraries.places.internal;
/* loaded from: classes2.dex */
public final class zzma {
public static Object zza(Object obj, String str) {
if (obj != null) {
return obj;
}
throw new NullPointerException(str.concat(" must not be null"));
}
public static String zzb(String str) {
if (str.isEmpty()) {
throw new IllegalArgumentException("identifier must not be empty");
}
if (!zzc(str.charAt(0))) {
throw new IllegalArgumentException("identifier must start with an ASCII letter: ".concat(str));
}
for (int i = 1; i < str.length(); i++) {
char charAt = str.charAt(i);
if (!zzc(charAt) && ((charAt < '0' || charAt > '9') && charAt != '_')) {
throw new IllegalArgumentException("identifier must contain only ASCII letters, digits or underscore: ".concat(str));
}
}
return str;
}
private static boolean zzc(char c) {
if (c < 'a' || c > 'z') {
return c >= 'A' && c <= 'Z';
}
return true;
}
}