getting Employee Object out of HashMap
What is I want to do is retrieve a value out of a hashmap, the value is an Employee Object stored in an ArrayList.
? How do I accomplish this?
=========== here's my psuedocode ========
read employee.file into an strLineArray
split the strLineArray into ID, FirstName, LastName, and Phone fields;
Employee employee = new Employee(ID, FirstName, LastName, Phone);
ArrayList directory = new ArrayList();
lastNameMap = new HashMap();
lastNameMap.put(new String(lastName), directory);
Question: how do I get an employee out the lastNameMap, given a lastName information? :o
Can someone also verify that I .put the directory (ArrayList) in the lastNameMap? :cool:
Thanks a bunch,