mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-26 16:31:26 +07:00
24 lines
514 B
Java
24 lines
514 B
Java
// "Replace Stream API chain with loop" "true"
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
private static String getString() {
|
|
return "abc";
|
|
}
|
|
|
|
private static boolean test(List<String> strings) {
|
|
String s = getString();
|
|
for (String string : strings) {
|
|
if (s.equals(string)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
System.out.println(test(Arrays.asList("a", "b", "c")));
|
|
}
|
|
} |