Class ATNConfigSet.ConfigHashSet
java.lang.Object
org.antlr.v4.runtime.misc.Array2DHashSet<ATNConfig>
org.antlr.v4.runtime.atn.ATNConfigSet.AbstractConfigHashSet
org.antlr.v4.runtime.atn.ATNConfigSet.ConfigHashSet
- Enclosing class:
ATNConfigSet
The reason that we need this is because we don't want the hash map to use
the standard hash code and equals. We need all configurations with the same
(s,i,_,semctx) to be equal. Unfortunately, this key effectively doubles
the number of objects associated with ATNConfigs. The other solution is to
use a hash table that lets us specify the equals/hashcode operation.-
Nested Class Summary
Nested classes/interfaces inherited from class Array2DHashSet
Array2DHashSet.SetIterator -
Field Summary
Fields inherited from class Array2DHashSet
buckets, comparator, currentPrime, INITAL_BUCKET_CAPACITY, INITAL_CAPACITY, initialBucketCapacity, initialCapacity, LOAD_FACTOR, n, threshold -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ATNConfigSet.AbstractConfigHashSet
asElementType, createBucket, createBucketsMethods inherited from class Array2DHashSet
add, addAll, clear, contains, containsAll, containsFast, equals, expand, get, getBucket, getOrAdd, getOrAddImpl, hashCode, isEmpty, iterator, remove, removeAll, removeFast, retainAll, size, toArray, toArray, toString, toTableStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface Set
spliterator
-
Constructor Details
-
ConfigHashSet
public ConfigHashSet()
-