VP
Size: a a a
VP
A
П
П
ch
VP
П
Dm
Dm
Dm
Dm
Dm
Dm
SS
Dm
Dm
SS
HH
Example{
interface Interface<Type>{
void handle(Type t);
}
Map<Class<?>, Interface<?>> items = new HashMap<>();
//ТУТ НУЖНО ЧЕКАТЬ ДОБАВЛЯЕМЫЙ ТИП<Type> void add(Class<Type> typeClass, Interface<Type> typeInterface){
items.put(typeClass, typeInterface);
}
void handle(){
//ТУТ !!!ОШИБКА!!!items.get(String.class).handle(new Object());
}
}```