66 lines
2.0 KiB
Java
66 lines
2.0 KiB
Java
|
package o;
|
||
|
|
||
|
import java.io.File;
|
||
|
import java.io.Serializable;
|
||
|
|
||
|
/* renamed from: o.gjE, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes6.dex */
|
||
|
public final class C15175gjE extends AbstractC15194gjo implements Serializable {
|
||
|
private final EnumC15197gjr b;
|
||
|
private final String[] d;
|
||
|
|
||
|
public C15175gjE(String str) {
|
||
|
this(str, EnumC15197gjr.SENSITIVE);
|
||
|
}
|
||
|
|
||
|
private C15175gjE(String str, EnumC15197gjr enumC15197gjr) {
|
||
|
if (str == null) {
|
||
|
throw new IllegalArgumentException("The suffix must not be null");
|
||
|
}
|
||
|
this.d = new String[]{str};
|
||
|
this.b = 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.d) {
|
||
|
EnumC15197gjr enumC15197gjr = this.b;
|
||
|
int length = str.length();
|
||
|
if (name.regionMatches(!enumC15197gjr.sensitive, name.length() - length, str, 0, 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.d) {
|
||
|
EnumC15197gjr enumC15197gjr = this.b;
|
||
|
int length = str2.length();
|
||
|
if (str.regionMatches(!enumC15197gjr.sensitive, str.length() - length, str2, 0, length)) {
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC15194gjo
|
||
|
public final String toString() {
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append(super.toString());
|
||
|
sb.append("(");
|
||
|
if (this.d != null) {
|
||
|
for (int i = 0; i < this.d.length; i++) {
|
||
|
if (i > 0) {
|
||
|
sb.append(",");
|
||
|
}
|
||
|
sb.append(this.d[i]);
|
||
|
}
|
||
|
}
|
||
|
sb.append(")");
|
||
|
return sb.toString();
|
||
|
}
|
||
|
}
|