(Call call)
| 61 | |
| 62 | /* Gets the first available employee who can handle this call. */ |
| 63 | public Employee getHandlerForCall(Call call) { |
| 64 | for (int level = call.getRank().getValue(); level < LEVELS - 1; level++) { |
| 65 | List<Employee> employeeLevel = employeeLevels.get(level); |
| 66 | for (Employee emp : employeeLevel) { |
| 67 | if (emp.isFree()) { |
| 68 | return emp; |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | return null; |
| 73 | } |
| 74 | |
| 75 | /* Routes the call to an available employee, or saves in a queue if no employee available. */ |
| 76 | public void dispatchCall(Caller caller) { |
no test coverage detected