mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-07 04:03:20 +07:00
GitOrigin-RevId: 5a8baeec399127391f8e2069e6915f322c524458
25 lines
529 B
Java
25 lines
529 B
Java
package org.example;
|
|
|
|
import java.io.File;
|
|
import java.util.Collection;
|
|
|
|
class Parent {
|
|
public boolean test(Collection<File> files) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
class Child extends Parent {
|
|
|
|
@Override
|
|
public boolean test(Collection<File> files) {
|
|
return files.stream().allMatch(file -> {
|
|
String name = file.getName();
|
|
return isABoolean(name);
|
|
});
|
|
}
|
|
|
|
private static boolean isABoolean(String name) {
|
|
return name.endsWith("jar") || name.endsWith("tar");
|
|
}
|
|
} |