mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-22 23:20:57 +07:00
19 lines
517 B
Java
19 lines
517 B
Java
import java.util.Arrays;
|
|
import java.util.Collections;
|
|
import java.util.HashSet;
|
|
import java.util.Set;
|
|
|
|
// "Extract Set from comparison chain" "true-preview"
|
|
public class Test {
|
|
public static final String BAR = "bar";
|
|
private static final Set<String> PROPERTIES = Collections.unmodifiableSet(new HashSet<>(Arrays.asList("foo", BAR, "baz")));
|
|
|
|
void testOr(int i, String property) {
|
|
int PROPERTIES;
|
|
|
|
if(i > 0 && Test.PROPERTIES.contains(property)) {
|
|
System.out.println("foobarbaz");
|
|
}
|
|
}
|
|
}
|