Use HashMap instead of Hashtable

This commit is contained in:
Sam Harwell 2012-07-18 15:05:27 -05:00
parent 44ef41ff29
commit 2056e019a5
1 changed files with 2 additions and 2 deletions

View File

@ -29,10 +29,10 @@
package org.antlr.v4.misc; package org.antlr.v4.misc;
import java.util.Hashtable; import java.util.HashMap;
/** Count how many of each key we have; not thread safe */ /** Count how many of each key we have; not thread safe */
public class FrequencySet<T> extends Hashtable<T, MutableInt> { public class FrequencySet<T> extends HashMap<T, MutableInt> {
public int count(T key) { public int count(T key) {
MutableInt value = get(key); MutableInt value = get(key);
if (value == null) return 0; if (value == null) return 0;