Employee emp = new Employee(); emp.setEmployeeID("#001"); emp.setEmployeeName("Bill Gates"); map.put(emp.getEmployeeID(), emp); map.put(in.getEmployeeID(), in);
Employee emp = (Employee) map.get(id); if (emp == null) { NoSuchEmployeeFault fault = new NoSuchEmployeeFault(); fault.setInfo("Could not find employee:" + id); throw fault; } return emp;
Collection values = map.values(); Employee[] emps = new Employee[values.size()]; values.toArray(emps); return emps;