|
-
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();
directory.add(employee);
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,
Fischen
Similar Threads
-
By scottish mike in forum .NET
Replies: 0
Last Post: 08-08-2002, 05:56 AM
-
By Derek Mooney in forum .NET
Replies: 94
Last Post: 10-29-2001, 08:44 PM
-
By Jaco de Villiers in forum XML
Replies: 1
Last Post: 06-01-2001, 05:50 PM
-
By Darta in forum VB Classic
Replies: 1
Last Post: 10-24-2000, 04:48 PM
-
By Tom Shreve in forum Enterprise
Replies: 0
Last Post: 04-07-2000, 08:15 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
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
|
Bookmarks