I’ve got the following code snippet that I need converted to kotlin:
Map<Class<?>, Fetcher> fetchers = Maps.newHashMap();
fetchers.put(OrgEmployees::class.java, OrgEmployeesFetcher(...))
fetchers.put(OrgTesters::class.java, OrgTestersFetcher(...))
where Fetcher
is an interface:
public interface Fetcher<I, O> {...}
and OrgEmployeesFetcher
, OrgTesttersFetcher
are implementations of this interface:
public class OrgEmployeesFetcher implements Fetcher<Object, OrgEmployees>{...}
public class OrgTestersFetcher implements Fetcher<Object, OrgTesters>{...}
I’m having trouble converting the first line: Map<Class<?>, Fetcher> fetchers = Maps.newHashMap();
.