what-the-bank/sources/o/C15173gjA.java

62 lines
1.8 KiB
Java

package o;
import java.io.File;
import java.io.Serializable;
/* renamed from: o.gjA, reason: case insensitive filesystem */
/* loaded from: classes6.dex */
public final class C15173gjA extends AbstractC15194gjo implements Serializable {
private final String[] c;
private final EnumC15197gjr d;
public C15173gjA(String str) {
this(str, EnumC15197gjr.SENSITIVE);
}
private C15173gjA(String str, EnumC15197gjr enumC15197gjr) {
if (str == null) {
throw new IllegalArgumentException("The prefix must not be null");
}
this.c = new String[]{str};
this.d = enumC15197gjr == null ? EnumC15197gjr.SENSITIVE : enumC15197gjr;
}
@Override // o.AbstractC15194gjo, o.InterfaceC15199gjt, java.io.FileFilter
public final boolean accept(File file) {
String name = file.getName();
for (String str : this.c) {
if (name.regionMatches(!this.d.sensitive, 0, str, 0, str.length())) {
return true;
}
}
return false;
}
@Override // o.AbstractC15194gjo, o.InterfaceC15199gjt, java.io.FilenameFilter
public final boolean accept(File file, String str) {
for (String str2 : this.c) {
if (str.regionMatches(!this.d.sensitive, 0, str2, 0, str2.length())) {
return true;
}
}
return false;
}
@Override // o.AbstractC15194gjo
public final String toString() {
StringBuilder sb = new StringBuilder();
sb.append(super.toString());
sb.append("(");
if (this.c != null) {
for (int i = 0; i < this.c.length; i++) {
if (i > 0) {
sb.append(",");
}
sb.append(this.c[i]);
}
}
sb.append(")");
return sb.toString();
}
}