Faye

Greenhorn
+ Follow
since Jan 26, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Faye

Andre,
Could you please post the name of the location where you took your essay test so that we can avoid it in the future?
Thanks.
Faye
Mark,
I like your approach of handling "ANY" keyword. In this way, the keyword is checked at the client side and it is easier for maintenance and future changes. I will incorporate it in my design. Thanks.
-Faye
Hi Travis,
My approach is kind of different from yours.
1. Parse criteria using StringTokenizer for ",". I also watch out for the scenario where there is only one search pair, such as "Carrie=ANY" (I try to make it as generic as possible).
2. Parse tokens for "=".
3. Find out the field position for each value pair. For example, Carrie is in 3rd position (description[3] is Carrie).
4. I populate a HashMap with key value pairs (key as the field position, and value as the field value to match).
All the above steps are handled in a separate utility class.
5. Read a record.
6. Loop through the previous populated HashMap. Access only those record fields, which are key value in the map. Compare value and add valid records to a list.
7. Turn the list into an Array and return it.
In this case, I don't need to go through every single field in each record. After all, I just need to compare values for the fields specified in the criteria.
Hope this will help.
-Faye
Never mind, a friend was playing a joke on me and changed the code when I wasn't looking.
Hello,
I just discovered a bug in the classes I received, which are supposed to be "complete and functional". Is this something I should expect
?
Thanks,
Fei