* @param map <code>FastHashMap</code> to copy.
* @return FastHashMap A copy of the <code>FastHashMap</code>
* that was passed in.
*/
public static FastHashMap copyFastHashMap(FastHashMap map) {
FastHashMap hResults = new FastHashMap();
for (Iterator i = map.keySet().iterator(); i.hasNext(); ) {
String key = (String)i.next();
Object value = map.get(key);
if (value instanceof String) {
hResults.put(key, new String((String)value));
} else if (value instanceof Msg) {
hResults.put(key, ((Msg)value).clone());
} else if (value instanceof Arg) {
hResults.put(key, ((Arg)value).clone());
} else if (value instanceof Var) {
hResults.put(key, ((Var)value).clone());
} else {
hResults.put(key, value);
}
}
hResults.setFast(true);
return hResults;
}