I have a SeniorEmployee class which has some attributes and under the same I have JuniorEmployee list. Now my criteria is to iterate in SeniorEmployee though streams and based on some criteria and then for the SeniorEmployee matching with the filter criteria we need to iterate in the juniorEmployee list and calculate their total salary. So, how can I do it in a single lambda expression though stream? Please help.
SeniorEmployee id filter criteria is if EmpCode is 10;
SeniorEmployee{
empCode;
List<JuniorEmployee> junEmpList
}
JuniorEmployee{
Emp Id;
Salary;
}