Main.java:27: error: cannot find symbol
}).collect(Collectors.toMap(e -> e.getKey(), Map.Entry::getValue));
^
symbol: method getKey()
location: variable e of type String
Main.java:27: error: incompatible types: cannot infer type-variable(s) CAP#1,T,K#1,U
}).collect(Collectors.toMap(e -> e.getKey(), Map.Entry::getValue));
^
(argument mismatch; invalid method reference
method getValue in interface Entry<K#2,V> cannot be applied to given types
required: no arguments
found: String
reason: actual and formal argument lists differ in length)
where T,K#1,U,K#2,V are type-variables:
T extends Object declared in method <T,K#1,U>toMap(Function<? super T,? extends K#1>,Function<? super T,? extends U>)
K#1 extends Object declared in method <T,K#1,U>toMap(Function<? super T,? extends K#1>,Function<? super T,? extends U>)
U extends Object declared in method <T,K#1,U>toMap(Function<? super T,? extends K#1>,Function<? super T,? extends U>)
K#2 extends Object declared in interface Entry
V extends Object declared in interface Entry
where CAP#1 is a fresh type-variable:
CAP#1 extends Object from capture of ?
2 errors