mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-21 04:50:58 +07:00
16 lines
394 B
Java
16 lines
394 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 interface Test {
|
|
Set<String> S = Collections.unmodifiableSet(new HashSet<>(Arrays.asList("foo", "bar", "baz")));
|
|
|
|
default void testOr(String s) {
|
|
if(S.contains(s)) {
|
|
System.out.println("foobarbaz");
|
|
}
|
|
}
|
|
}
|