Use HashMap instead of Hashtable
This commit is contained in:
parent
44ef41ff29
commit
2056e019a5
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue