mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
15 lines
265 B
Java
15 lines
265 B
Java
class Test {
|
|
static class TKey<T> {
|
|
}
|
|
|
|
public interface Getter {
|
|
<T> T getValue(TKey<T> key);
|
|
}
|
|
|
|
static final TKey<Boolean> KEY_B = new TKey<>();
|
|
|
|
public static void f(Getter getter) {
|
|
String name = getter.getValue(KEY_B) ? "foo" : "bar";
|
|
}
|
|
}
|