Package org.antlr.v4.runtime.atn
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
public static class ATNConfigSet.ConfigHashSet extends ATNConfigSet.AbstractConfigHashSet
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 org.antlr.v4.runtime.misc.Array2DHashSet
Array2DHashSet.SetIterator
-
-
Field Summary
-
Fields inherited from class org.antlr.v4.runtime.misc.Array2DHashSet
buckets, comparator, currentPrime, INITAL_BUCKET_CAPACITY, INITAL_CAPACITY, initialBucketCapacity, LOAD_FACTOR, n, threshold
-
-
Constructor Summary
Constructors Constructor Description ConfigHashSet()
-
Method Summary
-
Methods inherited from class org.antlr.v4.runtime.atn.ATNConfigSet.AbstractConfigHashSet
asElementType, createBucket, createBuckets
-
Methods inherited from class org.antlr.v4.runtime.misc.Array2DHashSet
add, addAll, clear, contains, containsAll, containsFast, equals, expand, get, getBucket, getOrAdd, getOrAddImpl, hashCode, isEmpty, iterator, remove, removeAll, removeFast, retainAll, size, toArray, toArray, toString, toTableString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
spliterator
-
-