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?
Can someone also verify that I .put the directory (ArrayList) in the lastNameMap?
Thanks a bunch,
By scottish mike in forum .NET
Last Post: 08-08-2002, 05:56 AM
By Derek Mooney in forum .NET
Last Post: 10-29-2001, 08:44 PM
By Jaco de Villiers in forum XML
Last Post: 06-01-2001, 05:50 PM
By Darta in forum VB Classic
Last Post: 10-24-2000, 04:48 PM
By Tom Shreve in forum Enterprise
Last Post: 04-07-2000, 08:15 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL