mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-22 14:50:53 +07:00
22 lines
421 B
Java
22 lines
421 B
Java
// "Extract Set from comparison chain" "true-preview"
|
|
|
|
package com.google.common.collect;
|
|
|
|
import java.util.Set;
|
|
|
|
class ImmutableSet<T> {
|
|
public static <T> ImmutableSet<T> of(T... elements) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public class Test {
|
|
private static final Set<String> S = ImmutableSet.of("foo", "bar", "baz");
|
|
|
|
void testOr(String s) {
|
|
if(S.contains(s)) {
|
|
System.out.println("foobarbaz");
|
|
}
|
|
}
|
|
}
|