I am creating a HashMap with custom object (say Employee) as key. 
**I have no modification access to Employee class.**
Employee object has no args constructor
Say `Map<String, Employee> empMap` is my map object.
How can I instantiate object in place and set values and put it in map.

```
Map<String, Employee> mymap = new HashMap<>();
myMap.put("employee_key", () -> {
    Employee e = new Employee();
    e.setSalary(10000);
    return e;
});

```

This shows error : Target type of lambda conversion must be an interface.

What i **dont** want to do:

```
myMap.put("employee_key", getEmployee(1000));
private Employee getEmployee(int salary){
    Employee e = new Employee();
    e.setSalary(salary);
    return e;
}

```

In short, I am expecting in place instantiation and assignment while putting it as value in a map **without using extra method** .